Basic ROS example on the BeagleBone Black

As a basic example, you can run a ROS core on one terminal on the BeagleBone Black:

$ roscore

And from another terminal publish a pose message (note you can press Tab Tab after geometry_msgs/Pose and it'd autocomplete the message fields, that then you need to change since it'd have the default values):

$ rostopic pub /dummy geometry_msgs/Pose
Position:
x: 1.0
y: 2.0
z: 3.0
Orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0 -r 10

Now, from your laptop (in the same network), you can set ROS_MASTER_URI to point to the BeagleBone Black (IP 192.168.1.6 in our case):

$ export ROS_MASTER_URI=http://192.168.1.6:11311

And now you should be able to see the pose published from the BeagleBone Black on your laptop doing:

$ rostopic echo -n1 /dummy
Position:
x: 1.0
y: 2.0
z: 3.0
Orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
---

If you use a PoseStamped, you can even visualize it on rviz.

From this point, you can check multiple projects at http://wiki.ros.org/BeagleBone, as well as another installation option, which uses the Angstrom OS instead of Ubuntu, but it does not support ROS Kinetic at the moment.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.74.54