ros入门—tf坐标系广播与监听的编程实现

1、catkin_create_pkg learning_tf roscpp rospy tf turtlesim
ros入门—tf坐标系广播与监听的编程实现_第1张图片

2、拷贝程序

3、配置cmakelist

add_executable(turtle_tf_broadcaster src/turtle_tf_broadcaster.cpp)
target_link_libraries(turtle_tf_broadcaster ${catkin_LIBRARIES})

add_executable(turtle_tf_listener src/turtle_tf_listener.cpp)
target_link_libraries(turtle_tf_listener ${catkin_LIBRARIES})

4、 ros入门—tf坐标系广播与监听的编程实现_第2张图片

rosrun learning_tf turtle_tf_broadcaster __name:=turtle1_tf_broadcaster /turtle1

rosrun learning_tf turtle_tf_broadcaster __name:=turtle2_tf_broadcaster /turtle2

rosrun learning_tf turtle_tf_listener

rosrun turtlesim turtle_teleop_key

你可能感兴趣的:(ROS学习)