RVIZ第一课
Try to use RVIZ:
It's already been installed, so, create a workspace first:
$ cd ~/catkin_ws/ $ catkin_make
$ source devel/setup.bash
Then, create the package(in the workspace/src folder):
catkin_create_pkg using_markers roscpp visualization_msgs
Then, in the src folder of the package, wget the cpp file:
$ wget https://raw.github.com/ros-visualization/visualization_tutorials/indigo-devel/visualization_marker_tutorials/src/basic_shapes.cpp
Let's explain the code later, keep building the package:
$ catkin_make
Run catking_make in your wokrspace, not the package folder.
Before you run rviz, use mkdir /my_frame to create blank forlder for tf (what's tf? learning...)
Now, start the rviz:
$ rosmake rviz $ rosrun using_markers basic_shapes $ rosrun rviz rviz
And don't forget firing up your ros core
In the rviz window, change the fix frame to /my_frame, now you will see the mark change every second from square to a ball and to an arrow...