Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- The previous screencast (giving more background on the rosbridge protocol), can be viewed here:
- http://www.youtube.com/watch?v=kaiwwaqH9jA
- --------------------
- More information on the Ping sensor (including the timing diagram shown in the video) is available on Parallax's product page for the Ping here:
- http://www.parallax.com/tabid/768/ProductID/92/Default.aspx
- --------------------
- To wire the Ping as in the video, the connections are:
- Ping Arduino
- GND<--->GND (either will do)
- 5V <--->5V
- SIG<--->12
- --------------------
- The code for the Wiring sketch written in the video can be found here:
- http://pastebin.com/BDHVEPbw
- --------------------
- The HTML page written in the video can be found here:
- http://pastebin.com/V1fEemg4
- --------------------
- Assuming your Arduino is connected to /dev/ttyACM0, you can run the project featured in the video by:
- 1) connecting the Ping sensor to your Arduino as described
- 2) uploading the supplied sketch to the Arduino board
- 3) starting a roscore
- 4) starting rosbridge
- 5) running the command:
- socat /dev/ttyACM0,ignoreeof - | sed -u -e '1,1 s/^.*/raw\r\n\r\n/' -e '1! s/\([0-9]*\)/\x00{"receiver":"\/echoTime","msg":{"data":\1},"type":"std_msgs\/Int64"}\xff/' | nc localhost 9090
- either in the background (via &) or in a dedicated terminal
- 6) opening the supplied web page in a web-socket enabled browser
- --------------------
- As always, you can always check out the latest rosbridge related tutorials and info at:
- http://www.ros.org/wiki/rosbridge
- or you can ask for help on IRC. #rosbridge is on the Freenode network.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement