Skip to content

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

@sciencectn

Description

@sciencectn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions