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

Revision history [back]

Your ROS_PACKAGE_PATH is wrong and the lines in your .bashrc look pretty messy. First you set the ROS_PACKAGE_PATH to the directory /home/bcddivad/code/ros, then you overwrite it and it is probably set to /opt/ros/electric/stacks and then you overwrite it again by setting it to /home/bcddivad/code/ros/turtle_tf:/opt/ros/electric/stacks which removes /home/bcddivad/code/ros.

In general, this kind of problems can easily be avoided by using something like rosws. Also have a look at this answer for a quick way to get things set up cleanly using rosws.

A quick fix in your case would be to edit ~/.bashrc and replace the three lines you posted by:

source /opt/ros/electric/setup.bash
export ROS_PACKAGE_PATH=$HOME/code/ros:$ROS_PACKAGE_PATH

That way, you use everything set up in /opt/ros/electric/setup.bash and you add $HOME/code/ros and all its subdirectories. You can verify the current ROS_PACKAGE_PATH by executing echo $ROS_PACKAGE_PATH.