[ros-users] urdf frame placement

John Hsu johnhsu at willowgarage.com
Tue Mar 23 03:28:04 UTC 2010


Hi Miguel,

In the attached launch script you had set a parameter in rviz node
    <node pkg="rviz" name="rviz_visualizer" type="rviz">
        <param name="robot_description" command="cat
/home/mprada/test_robot_urdf.xml"/>
    </node>
I recommend publishing the parameter and starting the rviz node separately,
    <node pkg="rviz" name="rviz_visualizer" type="rviz"/>
    <param name="robot_description" textfile="$(find
your_stack_name)/test_robot_urdf.xml" />

to spawn the robot in sim:
    <node name="spawn_robot" pkg="gazebo_tools" type="gazebo_model" args="-p
robot_description spawn robot_1" respawn="false" output="screen" />

for starting robot_state_publisher, a good example is
pr2_controller_manager/controller_manager.launcher

By the way, does gazebo run on the Intel graphics card for you?  I am
guessing no?
thanks,
John

On Mon, Mar 22, 2010 at 10:31 AM, Miguel Prada <miguel.register at gmail.com>wrote:

> Ok, I'll reply to myself. I think I'm going in the right direction now.
>
> I added a robot_state_publisher node to the previous scheme I was talking
> about. This node reads the robot description from the urdf file, receives
> JointState messages from the joint_states topic, and publishes the tf
> frames.
>
> Now everything seems to be working fine when I open rviz to visualize (no
> errors or warnings). However I have to rely on the frame position and
> orientation that's printed on the display properties panel, since the
> visualization doesn't work on the computer I'm working on (damn Intel
> integrated graphics...).
>
> Does this sound better?
>
> Regards,
> Miguel.
>
> El 21/03/2010, a las 21:06, Miguel Prada escribió:
>
> Hi John,
>
> First of all, thanks for you reply.
>
> I'd like to mention that talking about this issue with a colleague I've
> been able to understand (at least some of) the reasons why DH parameters are
> not the best choice to describe kinematic chains (e.g. problems with
> branching chains).
>
> For example, I find it quite confusing that the dimensions of the links are
>> specified inside the joint element.
>>
>
> I am not sure what you mean by above (here's the same link to the joint
> element definition <http://www.ros.org/wiki/urdf/XML/Joint>), can you
> please elaborate on the question a bit?
>
> The dimensions of links are specified here<http://www.ros.org/wiki/urdf/XML/Link>,
> where you can specify the dimensions for <visual> and <collision> body
> dimensions.
>
>
> This is because I was looking at it the wrong way. I was thinking of the
> link dimension only as the distance between two consecutive joints, but now
> I can see that it makes no sense. For example, as I mentioned above, that
> would make impossible (or at least very difficult) to represent branching
> chains.
>
> Also, is the world frame oriented like it's shown on the schematic on the
>> urdf tutorial page? With the y axis pointing upwards?
>>
>
> I think you are referring to this page<http://www.ros.org/wiki/urdf/Tutorials/Create%20your%20own%20urdf%20file>?
> The "World" frame is drawn to show how we define relative frame transforms
> between a sample set of frames.  You can view the "world" as a special link
> that's inertially fixed.  There is no requirement on how you define the
> "World" frame.  The informations captured in a robot description (URDF or
> DH) are simply relative transforms between frames that are attached to
> bodies and joints.  (So for example, you can take the tutorial screen and
> rotate it sideways, and the individual transforms between frames should
> remain valid).
>
>
> I guess that this must be a misconception on my side again. I thought that
> there was a unique 'world' frame, well defined, and upon which the rest of
> the transforms could be referenced. So I guess my question should have been:
> When a frame (e.g. world) is selected as the fixed frame in rviz, how does
> rviz display this frame? With the z axis pointing up?
>
> Does this question make more sense?
>
> Also, as a tool to understand this better, I'm trying to visualize a simple
> urdf robot description using rviz, but I'm having some trouble with this
> too. The way I'm doing it is creating a launch file that spawns a rviz node
> and loads the urdf file as a parameter, as explained here<http://www.ros.org/wiki/rviz/DisplayTypes/RobotModel>.
> The launch file is the one used in the 'create your own urdf' tutorial, with
> very simple box visual geometry added to the links. You can find the urdf
> and launch files on the attachment.
>
> The problem is that when I add the robot model display to rviz, and select
> world as the fixed frame, there's an error on the Robot Model display which
> says that there are no transforms from the links to the world ( No transform
> from [linkX] to [/world] ). There's also a .Global Status warning about the
> Fixed Frame which states "No tf data. Actual error: Fixed Frame [/world]
> does not exist".
>
> I realise that I'm probably doing it in a completely wrong way, so I would
> appreciate some pointers on the good direction. I have already read
> everything related that I've been able to find on the wiki (mostly on tf,
> rviz and urdf pages).
>
> Thanks in advance for you help and kindness :)
>
> Best,
> Miguel.
>
> <urdf_rviz.zip>
>
> El 19/03/2010, a las 19:52, John Hsu escribió:
>
> Hi Miguel,
>
> In general when describing the relative pose of two rigid bodies(links), a
> 6dof transform is used (as in tf).  That's the same approach taken in URDF.
> To be more specific, the same transform is the <origin> tag in your
> <joint>-element.  In addition, for revolute, prismatic and fixed joints, the
> joint axis coincides with the child link origin.
>
> If you need more information on conversion from D-H parameters to
> transforms between rigid body links, this link to the joint element
> definition <http://www.ros.org/wiki/urdf/XML/Joint> should help you get
> started.  Please let me know if you find the diagram(s) misleading or
> inadequate.   As usual, we always appreciate any comments or code (e.g.
> parser) contributions :)
>
> For example, I find it quite confusing that the dimensions of the links are
>> specified inside the joint element.
>>
>
> I am not sure what you mean by above (here's the same link to the joint
> element definition <http://www.ros.org/wiki/urdf/XML/Joint>), can you
> please elaborate on the question a bit?
>
> The dimensions of links are specified here<http://www.ros.org/wiki/urdf/XML/Link>,
> where you can specify the dimensions for <visual> and <collision> body
> dimensions.
>
> Also, is the world frame oriented like it's shown on the schematic on the
>> urdf tutorial page? With the y axis pointing upwards?
>>
>
> I think you are referring to this page<http://www.ros.org/wiki/urdf/Tutorials/Create%20your%20own%20urdf%20file>?
> The "World" frame is drawn to show how we define relative frame transforms
> between a sample set of frames.  You can view the "world" as a special link
> that's inertially fixed.  There is no requirement on how you define the
> "World" frame.  The informations captured in a robot description (URDF or
> DH) are simply relative transforms between frames that are attached to
> bodies and joints.  (So for example, you can take the tutorial screen and
> rotate it sideways, and the individual transforms between frames should
> remain valid).
>
> As a side note, we are working on a URDF->COLLADA converter (package name
> collada_urdf in robot_model trunk<https://code.ros.org/svn/ros-pkg/stacks/robot_model/trunk/collada_urdf/>)
> should you be interested.
>
> Hope I am answering your questions correctly.
> Best,
> John
>
>
> On Wed, Mar 17, 2010 at 10:41 AM, Miguel Prada <miguel.register at gmail.com>wrote:
>
>> Hi,
>>
>> I'm quite new to ROS and I'm trying to describe a simple robot manipulator
>> using urdf format.
>>
>> I'm having some trouble understanding the convention used (and the
>> parameters involved), and I just wanted to ask why is it that D-H convention
>> is not used. Specially with it being a standard for describing manipulators,
>> as far as I know.
>>
>> For example, I find it quite confusing that the dimensions of the links
>> are specified inside the joint element.
>>
>> Also, is the world frame oriented like it's shown on the schematic on the
>> urdf tutorial page? With the y axis pointing upwards?
>>
>> Thanks,
>> Miguel.
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20100322/d2e66dcb/attachment-0003.html>


More information about the ros-users mailing list