roscd/roslaunch cannot find the package that be built recently
Hi.everyone.I put some packages in my workspace ~/catkin_ws/src recently and then executed the conmmand catkin_make in ~/catkin_ws as usual.But I cannot use roscd to open the new build packages while old packages works. In my ~/.bashrc. I put source /opt/ros/indigo/setup.bash
and source /home/shantengfei/catkin_ws/devel/setup.bash
in the end.Iguess if I donot put the last setup.bash I cannot roscd any packages in ~/catkin_ws. What makes me confused is that some packages can be opened using roscd while the new one cannot. Could any one please give me a solution?
did you try running source "~/catkin_ws/devel/setup.bash" in your current terminal? Otherwise try to close everything and open a new consol.
Thanks for your reply.I put
source /home/shantengfei/catkin_ws/devel/setup.bash
in my ~/.bashrc, so I guess when I open a new terminal it can source automatically,right? I tried your suggestion but it still does'nt work.whenever you open a new terminal, the code in your ~/.bashrc file is executed. My bashrc file contains
source /opt/ros/indigo/setup.bash
andsource /home/username/catkin_ws/devel/setup.sh
Did your run catkin_make before opening a new consol. Is ther a CATKIN_IGNORE in your node maybe?After running
source /home/shantengfei/catkin_ws/devel/setup.bash
, try to runrospack profile
, maybe this will solve your problem.If you just type
roscd && pwd
, what is the output?Is your package printed if you run
rospack list| grep YOUR_PACKAGE_NAME_HERE
?Hi Ruben.Sorry to reply you solate. After trying the command
rospack profile
it worked.But if I create new package, should I execute the commandrospack profile
every time?Hi @tengfei, I've added as an answer because the comments are limited in size. In summary, YES, every time I create a new package, I run
rospack profile
to make sure it will be find.