headers are
from this :
/opt/ros/indigo/include/std_msgs
remapping
rosrun my_minimal_nodes minimal_publisher /miminal_nodes1/topic1:=topic1
ros::NodeHandle n("miminal_nodes1");
using different namespace can change the topic form
and by using remapping to return
rostopic pub
can publish isolutely
rostopic pub -r 20 /topic2 std_msgs/Float64 '{data: 0.7}'
rosed
rosed my_minimal_nodes minimal_publisher.cpp
ROS Tools: Catkin Simple
• CATKIN_SIMPLE simplifies catkin_make.
• Book code contains a script to create packages using catkin_simple.
• Create an alias in .bashrc
alias cs_create_pkg=‘~/ros/indigo/ros_ws/src/books/newman/learning_ros_external_packages/cs_create_pkg.py’
• Move to the correct folder location and create a new package as follows:
cs_create_pkg my_minimal_nodes2 roscpp std_msgs
• It will create appropriate CMakeLists.txt and packages.xml files.
• We also need only one command to compile and link!
cs_add_executable(minimal_publisher_3 src/minimal_publisher.cpp
单独编译|调试某包
调试
catkin_make -DCMAKE_BUILD_TYPE=Debug
单独编译
catkin_make -DCATKIN_WHITELIST_PACKAGES=“minimal_nodes"