ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rospack error: package 'roscpp' not found

asked 2017-06-17 16:15:21 -0500

UaeZombie gravatar image

Hello,

I am new to ROS and Linux, I am following tutorial on ROS installation, when i run the rospack find roscpp I get the following respond [rospack] Error: package 'roscpp' not found not sure why?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-06-18 21:06:34 -0500

ufr3c_tjc gravatar image

Make sure, when following the install tutorial, you executed the command

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc

This sets up your shell to always add the correct ROS variables to the Linux environment. You should then be able to use rospack find roscpp correctly. If not, check the output of printenv | grep ROS includes the lines:

ROS_ROOT=/opt/ros/kinetic/share/ros
ROS_PACKAGE_PATH=/opt/ros/kinetic/share

If the output is correct, but rospack find isn't working, we have another problem.

edit flag offensive delete link more

Comments

ROS_PACKAGE_PATH=/home/uaefame/fuerte_workspace/sandbox still not working

UaeZombie gravatar image UaeZombie  ( 2017-06-19 15:35:02 -0500 )edit

What version of Linux do you have? Fuerte is 5 years old now and I highly recommend installing something more recent. Preferably Kinetic, but Indigo at least.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-19 17:40:44 -0500 )edit

Anyway, your ROS_PACKAGE_PATH doesn't contain the path to the actual ros install. Type echo "source /opt/ros/fuerte/setup.bash" >> ~/.bashrc and restart your terminal.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-19 17:44:29 -0500 )edit
0

answered 2017-06-18 12:02:11 -0500

Felix_N gravatar image

I dont know whether it is important for you to run this particular command.

However using roscpp your CMakeLists.txt should contain:

find_package(catkin REQUIRED COMPONENTS 
roscpp
)

And your package.xml should contain:

<build_depend>roscpp</build_depend>
<run_depend>roscpp</run_depend>

After "making" your workspace, you should be able to use roscpp.

edit flag offensive delete link more

Comments

This won't make a difference. That is only when the compiler tells you it can't find roscpp, not rospack. The rospack command simply works on your ROS_PACKAGE_PATH environment variable.

ufr3c_tjc gravatar image ufr3c_tjc  ( 2017-06-18 17:50:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-06-17 16:15:21 -0500

Seen: 7,038 times

Last updated: Jun 18 '17