If roscd says similar to roscd: No such package/stack 'beginner_tutorials' , you will need to source the environment setup file like you did at the end of the create_a_workspace tutorial:
用roscd切换目录报错时,应该用以下三个命令添加环境变量,
beginner_tutorials父目录是catkin_ws
$ cd ~/catkin_ws $ source devel/setup.bash $ roscd beginner_tutorials