roscd returns: No such package <learning_tf2>

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

Rahulwashere gravatar image

Hello, I am a beginner at ROS and following URDF tutorials, so i am at currently this part http://wiki.ros.org/tf2/Tutorials/Wri... (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 https://answers.ros.org/question/6595... 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

Comments

1

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 -0600 )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 -0600 )edit

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

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

hi, I am encountering the same problem.

I created a new ws: $ source /opt/ros/noetic/setup.bash $ mkdir -p ~/tutorial_ws/src $ cd ~/tutorial_ws $ catkin_init_workspace src $ catkin_make

Then created the package within the ws: ~/Cursos/tutorial_ws$ catkin_create_pkg learning_tf2 tf2 tf2_ros roscpp rospy turtlesim

redid catkin make and sourced setup.bash

still roscd not finding the package

any help??

Thanks!

fbliman gravatar image fbliman  ( 2023-06-14 09:25:12 -0600 )edit