allenh1 / p2os

P2OS ROS driver for Groovy and later.
http://wiki.ros.org/p2os-purdue
27 stars 38 forks source link

Why is the namespace hardcoded to "/" for the urdf files? #44

Open sciencectn opened 7 years ago

sciencectn commented 7 years ago

As you can see here in the Pioneer 3AT file, the namespace for the robot is hardcoded to "/": https://github.com/allenh1/p2os/blob/master/p2os_urdf/defs/pioneer3at_body.xacro#L376

This means if you try changing the namespace in a launch file, it ignores it. For instance, to make it show up in Gazebo:

<group ns="robot0">
    <include file="$(find p2os_urdf)/launch/upload_pioneer3at.xml" />
    <node args="-x 0 -y 0  -z 0.2 -urdf -param robot_description -model pioneer" name="spawn_pioneer" output="screen" pkg="gazebo_ros" respawn="false" type="spawn_model"/>
</group>

We should see "/robot0/cmd_vel" as a ROS topic, but it just shows up as "/cmd_vel".

If you delete this line it works as normal.

allenh1 commented 7 years ago

That is a very good question. Would you like to patch it, or do you just want me to do it?

sciencectn commented 7 years ago

I tried patching it, but I could only get the Pioneer 3AT to work and not the 3dx. The 3dx doesn't want to give me a cmd_vel or odom topic.

I undid all my changes and just tried pioneer3dx.gazebo.launch and it still doesn't work. Does it work for you?

allenh1 commented 7 years ago

No, unfortunately 3dx is pretty broken. I don't know gazebo all that well (if you couldn't tell), and have been hoping someone could fix it for a long time (hint hint). If you want to work on it some, I'd very much appreciate it! If not, that's fine too.

On Mar 18, 2017 2:43 PM, Chris Taylor notifications@github.com wrote:

I tried patching it, but I could only get the Pioneer 3AT to work and not the 3dx. The 3dx doesn't want to give me a cmd_vel or odom topic.

I undid all my changes and just tried pioneer3dx.gazebo.launch and it still doesn't work. Does it work for you?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/allenh1/p2os/issues/44#issuecomment-287569781, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AB63o9WtfFaotd-VQThvociY3e-NXjfPks5rnDPOgaJpZM4MgyaO.