easily move relative base position in urdf (for 2 seperate robots)?
I want to display two robots in Rviz using URDF that do not share a base link (to be controlled in simulation using joint_state_publisher) by only changing 1 base offset origin in the world coordinate system for each robot.
I experimented with a lot of combinations using urdf displayed in rviz, but no luck. I'm sure someone has done this, only I cant find the answer.
I thought the axis and origin were offsets from the previous link (but since everything is defined on top of 0,0,0 this may be an erroneous assumption.)
TIA
Edit: This URDF only moves the base link offset - all connected links and joints above are aligned along (0,0,0) axiss:
<link name="base_link">
<visual>
<origin rpy="0 0 0" xyz="0 -0.5 0"/>
<geometry>
<mesh filename="package://fanuc_lrmate200id_support/meshes/lrmate200id/visual/base_link.stl" scale="1.0 1.0 1.0"/>
</geometry>
....
Want to move (offset) robot -.5 in y axis so I can add another robot in the +.5 in the y axis.
Sample would work best - tried suggestions found on internet but didnt work. And could not find anything on the www.
Appears as if I have to offset all links/joints by base amount along lines of pr2.
Normally the robot is moved around in rviz by the frame transformations published by your odometry components. That is, the odometry publishes the transform from the
odom
frame tobase_link
(or whatever the name of your robot's main frame is).joint_state_publisher
is not used for this.Maybe give a little more detail what you're trying to do? You want to visualize two robots? That's doable. How are you publishing odometry for each? Do you have a separate URDF for each? (Or two instances of the state publishers and the same URDF.)
You can create a dummy link for each robot that will connect from world link to the base link of each robot, assuming you are having two robots defined in the same URDF. Not sure if this is what you are looking for.