创建操作空间
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
检查环境变量
echo $ROS_PACKAGE_PATH
创建功能包
cd ~/catkin_ws/src
catkin_create_pkg my_pkg std_msgs rospy roscpp
编译
cd ~/catkin_ws/
catkin_make
source devel/setup.bash
一些指令
rostopic list
#列出所有话题
rosnode list
#列出所有结点
rostopic info /话题
rostopic echo /话题
rostopic hz /话题
rosrun rqt_graph rqt_graph
#启动可视化节点关系
rosrun rqt_tf_tree rqt_tf_tree
#查看tf树
roscd 包名
#打开ros包
rosnode kill
#杀死某个节点