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

ROS newbie and questions about adding to ROS_PACKAGE_PATH

asked 2012-10-22 10:17:25 -0600

joe.s gravatar image

I am new to ROS (and Unix environments) and am trying to go through some of the tutorials. I realize this is probably a basic question.

I'm currently reading through this tutorial and am running in to a snag.

(I have already already added the stack sudo apt-get install ros-fuerte-dynamixel-motor)

In the first step, the tutorial states that my current directory is on the ROS path. (I am currently using a turtlebot) I have attempted to add this path to the directory

export ROS_PACKAGE_PATH=/home/turtlebot/ros/ros-pkg ...

Then, when running this command roscreate-pkg dynamixel_tutorials dynamixel_controllers

I receive this error: ERROR: dependency [dynamixel_controllers] cannot be found

Any ideas? I'm very confused.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
4

answered 2012-10-22 21:14:00 -0600

Lorenz gravatar image

Managing ROS_PACKAGE_PATH manually is not recommended. It just leads to a messed up environment to easily. Instead, you should follow the install page and the tutorials and use rosws to set up an overlay. Have a look at this page and this tutorial.

edit flag offensive delete link more
4

answered 2012-10-22 10:23:13 -0600

kszonek gravatar image

Try:

export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/turtlebot/ros/ros-pkg

Otherwise it will remove previous paths.

edit flag offensive delete link more
0

answered 2012-10-22 10:28:44 -0600

joe.s gravatar image

kszonek: That's interesting...

After running this command export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/turtlebot/ros/ros-pkg

I ran this command roscreate-pkg dynamixel_tutorials dynamixel_controllers

I got back a warning saying that the current working directory is not on the ROS_PACKAGE_PATH... and I need to edit the dynamixel_tutorials/manifest.xml and mainpage.dox...

Does that mean that the path /home/turtlebot/ros/ros-pkg is not correct?

Also, what would need to be edited in the .xml and .dox files?

edit flag offensive delete link more

Comments

You shouldnt post an anwer to ask question - it is not a forum, use comments. Where do you create this ne package? In this directory added to ROS path? It should work then, without need to edit manifest.

kszonek gravatar image kszonek  ( 2012-10-22 10:35:36 -0600 )edit

How do I know where the new package is created? Like I said, I'm very new to ROS and the tutorials I've read so far are vague at best and assume I know things I don't... How do I know if the directory is added to the ROS path? Is there a file that this is written to?

joe.s gravatar image joe.s  ( 2012-10-22 10:37:43 -0600 )edit

I see you are new to Linux too. echo $ROS_PACKAGE_PATH lists you all paths. Try cd /home/turtlebot/ros/ros-pkg and then create your package.

kszonek gravatar image kszonek  ( 2012-10-22 10:39:42 -0600 )edit

That's also something that's weird... the ros folder is empty. There is no ros-pkg in that folder. It's like the ros-pkg was never created. Or am I thinking of this incorrectly?

When running the echo command, I get /opt/ros/fuerte/stacks:/home/turtlebot/ros/ros-pkg

So, it looks like /home/turtle

joe.s gravatar image joe.s  ( 2012-10-22 10:41:55 -0600 )edit

/home/turtlebot/ros/ros-pkg was, in fact added to the path. Why would I be getting the above error then?

joe.s gravatar image joe.s  ( 2012-10-22 10:44:04 -0600 )edit

Your path needs to include all the directories with ROS packages on your system. So every time you create a new package, you'll need to add it to the ROS_PACKAGE_PATH unless the enclosing folder is in the path already. See here

thebyohazard gravatar image thebyohazard  ( 2012-10-22 10:45:24 -0600 )edit

Run pwd in directory you created package in and add it to ROS_PACKAGE_PATH. I strongly advise you to learn more about software development under Linux. Since you have problems at the very begining, I cant imagine what will happen later.

kszonek gravatar image kszonek  ( 2012-10-22 10:46:09 -0600 )edit

@joe.sanford I agree with what the other people are saying here. I think its less of a ROS issue and more of a lack of linux experience (It is hard when starting out. That is not a negative towards you). Keep with it though (its worth it).

PerkinsJames gravatar image PerkinsJames  ( 2012-10-22 11:24:58 -0600 )edit

Question Tools

Stats

Asked: 2012-10-22 10:17:25 -0600

Seen: 1,576 times

Last updated: Oct 22 '12