roscd returns: No such package <learning_tf2>

asked 2020-07-16 01:42:46 -0500

Rahulwashere gravatar image

Hello, I am a beginner at ROS and following URDF tutorials, so i am at currently this part (Writing a tf2 static broadcaster (Python))

so i have created the "learning_tf2 package and it exists. but when i write roscd_learning_tf2 it returns roscd: No such package/stack 'learning_tf2'. I went through this question however even after following the steps given in answer i get the same error. SINCE i don't have enough points to upload an image, i would upload the content:

rahul@rahul:~$ source catkin_ws/devel/setup.bash

rahul@rahul:~$ catkin_create_pkg learning_tf2 tf2 tf2_ros roscpp rospy turtlesimCreated file learning_tf2/package.xml

Created file learning_tf2/CMakeLists.txt

Created folder learning_tf2/include/learning_tf2

Created folder learning_tf2/src

Successfully created files in /home/rahul/learning_tf2. Please adjust the values in package.xml.

rahul@rahul:~$ roscd learning_tf2 roscd: No such package/stack 'learning_tf2'

edit retag flag offensive close merge delete



Hi @Rahulwashere,

Remember that, to have rosbash commands available you need to source your enviroment with:

source /opt/ros/noetic/setup.bash

Also take into account that roscd command will not find the package if you did not catkin_make and re-source the terminal.

Weasfas gravatar image Weasfas  ( 2020-07-17 03:22:29 -0500 )edit

HI, i tried it again by deleting the package and redo it, so first i wrote "source /opt/ros/kinetic/setup.bash then follow the command source catkin_ws/devel/setup.bash followed by the commands i wrote in the question. however the problem presists. i still get roscd learning_tf2:No such package/stack 'learning_tf2'. i did catkin make too, can you tell me how to resource the terminal, may be i am missing that

Rahulwashere gravatar image Rahulwashere  ( 2020-07-17 05:19:00 -0500 )edit

Hello, i was finally able to figure it out. thank you!

Rahulwashere gravatar image Rahulwashere  ( 2020-07-17 06:02:13 -0500 )edit