1. Turtlesim Try
rospack find turtlesim
Begin
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
//The three commands must be in three shells.
2. Create a workspace
echo $ROS_PACKAGE_PATH
mkdir -p ~/dev/catkin_ws/src
cd ~/dev/catkin_ws/src
catkin_init_workspace
cd ~/dev/catkin_ws
catkin_make
source devel/setup.bash
//在新终端下无法定位功能包时,可运行此命令解决,因此可将此命令写入.bashrc中彻底解决问题。
3. Create a package and build it
cd ~/dev/catkin_ws/src
catkin_create_pkg tutorials std_msgs roscpp
//catkin_create_pkg [package_name] [depend1] [depend2] [depend...]
cd ~/dev/catkin_ws
catkin_make //build all
//catkin_make tutorials //build tutorials only