[ros-users] gazebo controller plugins and spawning multiple robots
jrousseau at aptima.com
Mon Aug 16 20:19:54 UTC 2010
I'm trying to spawn several robots of the same type in gazebo through ros and am
hitting what seems to be a controller namespacing issue. What I would like is
for each robot to live in its own namespace like:
robot1/odom
robot1/cmd_vel
...
robot2/odom
robot2/cmd_vel
...
The urdf's I'm currently using (erratic_description/urdf/erratic_base.xacro from
ua-ros-pkg) take in a namespace directly inside the URDF file (example below):
<controller:diffdrive_plugin name="differential_drive_controller"
plugin="libdiffdrive_plugin.so">
<alwaysOn>true</alwaysOn>
<update>100</update>
<updateRate>100.0</updateRate>
<leftJoint>base_link_right_wheel_joint</leftJoint>
<rightJoint>base_link_left_wheel_joint</rightJoint>
<wheelSeparation>${caster_wheel_offset_y*2}</wheelSeparation>
<wheelDiameter>${wheel_radius*2}</wheelDiameter>
<torque>5</torque>
<interface:position name="position_iface_0"/>
<robotNamespace>robot1</robotNamespace>
<topicName>cmd_vel</topicName>
</controller:diffdrive_plugin>
So basically the problem is this: Since the controller converts gazebo objects
into ros topics and the controller is inside the definition of a robot, how do I
uniquely specify namespaces for multiple robots based on the same URDF?
I could just make several copies of the erratic_base.xacro and just change the
<robotNamespace> tag in each, but that seems kludgy. Is there some way to pass
in variables to a URDF from launch file or something?
PS is this even the general method for working with multiple robots with ros +
gazebo (ie spawning several robots under different namespaces?) or am I heading
in the wrong direction...
Jeff
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
More information about the ros-users
mailing list