Code Monkey home page Code Monkey logo

urdf_tutorial's Introduction

urdf_tutorial: Learning URDF Step by Step

  1. Building a Visual Robot Model with URDF from Scratch - Learn how to build a visual model of a robot that you can view in Rviz

  2. Building a Movable Robot Model with URDF - Learn how to define movable joints in URDF

  3. Adding Physical and Collision Properties to a URDF Model - Learn how to add collision and inertial properties to links, and how to add joint dynamics to joints.

  4. Using Xacro to Clean Up a URDF File - Learn some tricks to reduce the amount of code in a URDF file using Xacro

See also urdf_sim_tutorial for the final tutorial: Using a URDF in Gazebo - Preliminary tutorial on how to spawn and control your robot in Gazebo.

urdf_tutorial's People

Contributors

bgatten avatar clalancette avatar dlu avatar felixduvallet avatar gavanderhoorn avatar isucan avatar jtbandes avatar k-okada avatar shaun-edwards avatar sloretz avatar tkruse avatar tony2guo avatar yamachaso avatar youtalk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urdf_tutorial's Issues

Problem with "RobotModel" in Rviz

I just execute the examples in your tutorial without any change. But all examples, except the 1st one, have such a problem "no transform from [] to []" as shown in the following figure.
image

However, when I add "RobotState", it is alright, like this.
image
So could you help me solve the above problem?

How to install urdf_tutorial binaries for ros2 foxy

My problem is simple. I can't seem to install the urdf-tutorial ros2 foxy binaries. Am I missing something obvious?

Input:
sudo apt install ros-foxy-urdf-tutorial

Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package ros-foxy-urdf-tutorial

how install this package with ROS Humble and Gazebo Fortress

Hi, how install this package with ROS Humble and Gazebo Fortress ?
Package 'urdf_tutorial' not found: "package 'urdf_tutorial' not found, searching:

I encountered errors:

  1. Captured stderr output: warning: No module named 'rosgraph'
  2. Captured stderr output: error: No such file or directory: urdf/01-myfirst.urdf
CMake Error at /home/dvogureckiy99/ros2_humble/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:41 (if):
  if given arguments:

    "ament_cmake_core" "IN_LIST" "_ARG_EXCLUDE"

  Unknown arguments specified

Assorted minor errors

I recently went through the tutorial and encountered the following issues:

  1. The image multipleshapes.png includes a box of dimensions .6m x .2m x .1m rather than what is written in the urdf (ie .6m x .1m x .2m).
  2. In both 05-visual.urdf and 06-flexible.urdf, the link right_front_wheel has a visual element with two different origins.

Robot_model tf_error

Hi, i am having a very similar issue to " #38" , where i get an transform error on a seemingly correct urdf (meaning e.g. i have a first link, then a follow_up joint which specifies the child link of that fist link and the chain continues like this). Now I expected that, when the first link is published to rviz, that then the chain would be processed, and therefore all links displayed. However this is the output:
image

The loaded launchfile loads the robot model like this:

<arg name="bin" default="$(find peg_in_hole)/urdf/r2d2.urdf"/>

<param name="r2d2/robot_description" command="$(find xacro)/xacro $(arg bin)" />

<node pkg="joint_state_publisher" type="joint_state_publisher" name="joint_state_publisher"/>
<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher"/>

<node name="rviz" pkg="rviz" type="rviz" required="true" />

I would expect these lines of code to load the .urdf description (which is correctly written, copied out of the tutorial) and publish the joints to /joint_states from where it goes to /tf and results in the display of the links.

I am pretty new to this so maybe i got something wrong. I can only tell that the joints never arrive at /tf or /tf_static, so i am guessing that something is missing, but i don't know what and can't seem to find anything.

`

fail to run the example in RoS2 foxy

Hi Dear urdf support team,

I am following this urdf tutorial on the RoS2 foxy tutorial. I have downloaded this urdf_tutorial folder to my RoS2 workspace and built it.
image

Somehow, when I execute the below python script, there are some errors.

ros2 launch urdf_tutorial display.launch.py model:=urdf/01-myfirst.urdf

The error is as displayed in the below picture
image

Seems there are some inherent code errors in the files you provide, because I don't see this parameter_description module in the launch_ros package.
image

I haven't changed anything in the folder's files, but there are still such errors. Is it because the urdf_tutorial is still not supported in RoS2 foxy?

Using ros_control diff_drive_controller

Hi, I am working on adapting the R2D2 URDF tutorial to use ros_control's diff_drive_controller (http://wiki.ros.org/diff_drive_controller) together with the gazebo_ros_control plugin, replacing the older:

  • differential_position2d
  • gazebo_ros_p3d
  • gazebo_ros_controller_manager

(https://github.com/ros/urdf_tutorial/blob/master/urdf/r2d2.xacro#L245)

Would you be amenable to a pull request to this repo, and having me add another tutorial to the http://wiki.ros.org/urdf/Tutorials page?

Availability of Binary Packages for Windows

Hello,

I am working on a project using ROS 2 Iron on a Windows machine and am interested in using the urdf_tutorial package. I came across the Using URDF with Robot State Publisher tutorial which mentions "If you installed urdf_tutorial binaries, this should already be the case." I am wondering if there are binary packages available for Windows and if so, how I can install them.

If the binary packages are not available for Windows, could you please provide any guidance on how to compile and use urdf_tutorial on Windows?

Thank you for your time and assistance.

Create new branch for ROS2

Hi, I have a branch up in knatsuki@36c3fba that ports over the tutorial to ros2 foxy. Since it's using the new launch substitution syntax, it won't work for eloquent or below. If you create a new branch in the repo, I'd be happy to put a PR up. Let me know, thanks!

How run urdf in Gazebo

Ok, I am new to ROS and gazebo. I have already gone through the online tutorials. The online gazebo tutorial is very vague about how to take a urdf file and run it on gazebo. Can someone explain to me how to take a urdf file (running in rviz) and run it on Gazebo.

PS. I know about the including inertia and other tags for gazebo.

Release into Melodic

All of the dependencies for this package are available in Melodic now, can we please get this released there? Thanks in advance.

dependency on gazebo_ros

While installing ros-lunar-desktop I was surprised to see it needing to pull in ros-lunar-gazebo-ros and therefore libgazebo8. These are being pulled in by this repository (only this one AFAICT).

From my perspective, the difference in "desktop" and "desktop-full" is that "desktop" has less dependencies, avoiding things like Stage, Gazebo, PCL, etc... This is particularly important on systems like macOS where building gazebo and PCL and stuff can be an undesired time sync.

So I'd propose that we either move these tutorials to "desktop-full" or split out the part of the tutorials that depend on gazebo_ros and gazebo_ros_control. I think those parts are useful and I would like to see them in at least "desktop-full", but I also would like to see a slightly slimmer set of dependencies for just plain "desktop".

Anyone have an opinion on what direction to take, or maybe other ideas for how to accomplish this?

@mikaelarguedas


One other use case I'll put forward for why this is important is that if Gazebo7 (used in Kinetic) and Gazebo8 (used in Lunar) cannot be installed at the same time (still working out if that is intended to be the case) then on a system with ros-kinetic-desktop-full (or more) installed cannot also install ros-lunar-desktop at the same time. That's really unfortunate from my perspective. I'd love to see ros-kinetic-desktop-full and ros-lunar-desktop-full side by side, but at least if desktop did not include a dependency on gazebo_ros it would enable the other case I described for now.

TIFFFieldWithTag: Internal error in sample urdf

Hi all,

When I try to check 05-visual and 06-flexible urdf file as tutorial, it gave me warning and model in rviz is not properly displayed.

My system is Ubuntu 16.04 with ROS Kinetic, and I tried both compiling from source code and installing from binary package, but failed in the same way.

I wish to report this situation to you. @DLu

$ roslaunch urdf_tutorial display.launch model:=urdf/05-visual.urdf
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
WARNING: disk usage in log directory [/home/username/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.
xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
...
ROS_MASTER_URI=http://localhost:11311
core service [/rosout] found
process[joint_state_publisher-1]: started with pid [20028]
process[robot_state_publisher-2]: started with pid [20029]
process[rviz-3]: started with pid [20030]
TIFFFieldWithTag: Internal error, unknown tag 0x829a.
TIFFFieldWithTag: Internal error, unknown tag 0x829d.
TIFFFieldWithTag: Internal error, unknown tag 0x8822.
TIFFFieldWithTag: Internal error, unknown tag 0x8824.
TIFFFieldWithTag: Internal error, unknown tag 0x8827.
TIFFFieldWithTag: Internal error, unknown tag 0x8828.
TIFFFieldWithTag: Internal error, unknown tag 0x9000.
TIFFFieldWithTag: Internal error, unknown tag 0x9003.
TIFFFieldWithTag: Internal error, unknown tag 0x9004.
TIFFFieldWithTag: Internal error, unknown tag 0x9101.
TIFFFieldWithTag: Internal error, unknown tag 0x9102.
TIFFFieldWithTag: Internal error, unknown tag 0x9201.
TIFFFieldWithTag: Internal error, unknown tag 0x9202.
TIFFFieldWithTag: Internal error, unknown tag 0x9203.
TIFFFieldWithTag: Internal error, unknown tag 0x9204.
TIFFFieldWithTag: Internal error, unknown tag 0x9205.
TIFFFieldWithTag: Internal error, unknown tag 0x9206.
TIFFFieldWithTag: Internal error, unknown tag 0x9207.
TIFFFieldWithTag: Internal error, unknown tag 0x9208.
TIFFFieldWithTag: Internal error, unknown tag 0x9209.
TIFFFieldWithTag: Internal error, unknown tag 0x920a.
TIFFFieldWithTag: Internal error, unknown tag 0x9214.
TIFFFieldWithTag: Internal error, unknown tag 0x927c.
TIFFFieldWithTag: Internal error, unknown tag 0x9286.
TIFFFieldWithTag: Internal error, unknown tag 0x9290.
TIFFFieldWithTag: Internal error, unknown tag 0x9291.
TIFFFieldWithTag: Internal error, unknown tag 0x9292.
TIFFFieldWithTag: Internal error, unknown tag 0xa000.
TIFFFieldWithTag: Internal error, unknown tag 0xa001.
TIFFFieldWithTag: Internal error, unknown tag 0xa002.
TIFFFieldWithTag: Internal error, unknown tag 0xa003.
TIFFFieldWithTag: Internal error, unknown tag 0xa004.
TIFFFieldWithTag: Internal error, unknown tag 0xa20b.
TIFFFieldWithTag: Internal error, unknown tag 0xa20c.
TIFFFieldWithTag: Internal error, unknown tag 0xa20e.
TIFFFieldWithTag: Internal error, unknown tag 0xa20f.
TIFFFieldWithTag: Internal error, unknown tag 0xa210.
TIFFFieldWithTag: Internal error, unknown tag 0xa214.
TIFFFieldWithTag: Internal error, unknown tag 0xa215.
TIFFFieldWithTag: Internal error, unknown tag 0xa217.
TIFFFieldWithTag: Internal error, unknown tag 0xa300.
TIFFFieldWithTag: Internal error, unknown tag 0xa301.
TIFFFieldWithTag: Internal error, unknown tag 0xa302.
TIFFFieldWithTag: Internal error, unknown tag 0xa401.
TIFFFieldWithTag: Internal error, unknown tag 0xa402.
TIFFFieldWithTag: Internal error, unknown tag 0xa403.
TIFFFieldWithTag: Internal error, unknown tag 0xa404.
TIFFFieldWithTag: Internal error, unknown tag 0xa405.
TIFFFieldWithTag: Internal error, unknown tag 0xa406.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa408.
TIFFFieldWithTag: Internal error, unknown tag 0xa409.
TIFFFieldWithTag: Internal error, unknown tag 0xa40a.
TIFFFieldWithTag: Internal error, unknown tag 0xa40b.
TIFFFieldWithTag: Internal error, unknown tag 0xa40c.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa420.
TIFFFieldWithTag: Internal error, unknown tag 0x829a.
TIFFFieldWithTag: Internal error, unknown tag 0x829d.
TIFFFieldWithTag: Internal error, unknown tag 0x8822.
TIFFFieldWithTag: Internal error, unknown tag 0x8824.
TIFFFieldWithTag: Internal error, unknown tag 0x8827.
TIFFFieldWithTag: Internal error, unknown tag 0x8828.
TIFFFieldWithTag: Internal error, unknown tag 0x9000.
TIFFFieldWithTag: Internal error, unknown tag 0x9003.
TIFFFieldWithTag: Internal error, unknown tag 0x9004.
TIFFFieldWithTag: Internal error, unknown tag 0x9101.
TIFFFieldWithTag: Internal error, unknown tag 0x9102.
TIFFFieldWithTag: Internal error, unknown tag 0x9201.
TIFFFieldWithTag: Internal error, unknown tag 0x9202.
TIFFFieldWithTag: Internal error, unknown tag 0x9203.
TIFFFieldWithTag: Internal error, unknown tag 0x9204.
TIFFFieldWithTag: Internal error, unknown tag 0x9205.
TIFFFieldWithTag: Internal error, unknown tag 0x9206.
TIFFFieldWithTag: Internal error, unknown tag 0x9207.
TIFFFieldWithTag: Internal error, unknown tag 0x9208.
TIFFFieldWithTag: Internal error, unknown tag 0x9209.
TIFFFieldWithTag: Internal error, unknown tag 0x920a.
TIFFFieldWithTag: Internal error, unknown tag 0x9214.
TIFFFieldWithTag: Internal error, unknown tag 0x927c.
TIFFFieldWithTag: Internal error, unknown tag 0x9286.
TIFFFieldWithTag: Internal error, unknown tag 0x9290.
TIFFFieldWithTag: Internal error, unknown tag 0x9291.
TIFFFieldWithTag: Internal error, unknown tag 0x9292.
TIFFFieldWithTag: Internal error, unknown tag 0xa000.
TIFFFieldWithTag: Internal error, unknown tag 0xa001.
TIFFFieldWithTag: Internal error, unknown tag 0xa002.
TIFFFieldWithTag: Internal error, unknown tag 0xa003.
TIFFFieldWithTag: Internal error, unknown tag 0xa004.
TIFFFieldWithTag: Internal error, unknown tag 0xa20b.
TIFFFieldWithTag: Internal error, unknown tag 0xa20c.
TIFFFieldWithTag: Internal error, unknown tag 0xa20e.
TIFFFieldWithTag: Internal error, unknown tag 0xa20f.
TIFFFieldWithTag: Internal error, unknown tag 0xa210.
TIFFFieldWithTag: Internal error, unknown tag 0xa214.
TIFFFieldWithTag: Internal error, unknown tag 0xa215.
TIFFFieldWithTag: Internal error, unknown tag 0xa217.
TIFFFieldWithTag: Internal error, unknown tag 0xa300.
TIFFFieldWithTag: Internal error, unknown tag 0xa301.
TIFFFieldWithTag: Internal error, unknown tag 0xa302.
TIFFFieldWithTag: Internal error, unknown tag 0xa401.
TIFFFieldWithTag: Internal error, unknown tag 0xa402.
TIFFFieldWithTag: Internal error, unknown tag 0xa403.
TIFFFieldWithTag: Internal error, unknown tag 0xa404.
TIFFFieldWithTag: Internal error, unknown tag 0xa405.
TIFFFieldWithTag: Internal error, unknown tag 0xa406.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa408.
TIFFFieldWithTag: Internal error, unknown tag 0xa409.
TIFFFieldWithTag: Internal error, unknown tag 0xa40a.
TIFFFieldWithTag: Internal error, unknown tag 0xa40b.
TIFFFieldWithTag: Internal error, unknown tag 0xa40c.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa407.
TIFFFieldWithTag: Internal error, unknown tag 0xa420.

With the not complete model like this:
screenshot from 2017-05-26 16-37-36

I found others may also have this problem, check here if you search "TIFFFieldWithTag" .

ImportError: No module named 'yaml'

I operate step by step, following < http://stevenshi.me/2017/07/08/ros-primary-tutorial-17 >
When I use command < roslaunch urdf_tutorial display.launch model:=urdf/01-myfirst.urdf >, failed.
started core service [/rosout]
process[joint_state_publisher-2]: started with pid [7172]
process[robot_state_publisher-3]: started with pid [7177]
process[rviz-4]: started with pid [7178]
Traceback (most recent call last):
File "/opt/ros/melodic/lib/joint_state_publisher/joint_state_publisher", line 3, in
import rospy
File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/init.py", line 47, in
from std_msgs.msg import Header
File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/init.py", line 1, in
from ._Bool import *
File "/opt/ros/melodic/lib/python2.7/dist-packages/std_msgs/msg/_Bool.py", line 5, in
import genpy
File "/opt/ros/melodic/lib/python2.7/dist-packages/genpy/init.py", line 34, in
from . message import Message, SerializationError, DeserializationError, MessageException, struct_I
File "/opt/ros/melodic/lib/python2.7/dist-packages/genpy/message.py", line 44, in
import yaml
ImportError: No module named 'yaml'
[joint_state_publisher-2] process has died [pid 7172, exit code 1, cmd /opt/ros/melodic/lib/joint_state_publisher/joint_state_publisher __name:=joint_state_publisher __log:=/home/lily/.ros/log/ff648b1c-8c68-11e9-95b8-6014b3858129/joint_state_publisher-2.log].
log file: /home/lily/.ros/log/ff648b1c-8c68-11e9-95b8-6014b3858129/joint_state_publisher-2*.log

Combining tf data and URDF model

Hi, I have a human URDF model that I can display in Rviz and I am getting tf data from Kinect v2. I am trying to place human URDF model on the tf data so I will have a chance to see the human URDF model moving instead of lines representing skeleton. Is there way for me to do that? Thanks a lot!

URDF Tutorial UPDATE-GROOVY

The github link in GROOVY (http://www.ros.org/wiki/urdf_tutorial) is broken. The HYDRO link is the most update version and works for GROOVY.

Can someone please update the github link for groovy because it took me a long time to figure out that the urdf.vcg cannot be modified and needs to be saved to in another location besides /opt/ros/groovy/..

A note must also be made in the 1. Building a Visual Robot Model with URDF from Scratch for the user to update their urdf_tutorial file with this one : https://github.com/ros/urdf_tutorial/tree/master/urdf_tutorial
Once this has been done then they can easily bring up their first model in rviz with the command: roslaunch urdf_tutorial display.launch model:=01-myfirst.urdf

Best,

Ish Sanchez

Kinetic Release

This package is ready to be released into Kinetic. @DLu let us know if you plan to make the release or if you'd like us to take over. Happy Friday!

rviz doesn't show any shape

Hi,
I'm trying to build my first URDF model, following this tutorial:
http://wiki.ros.org/urdf/Tutorials/Building%20a%20Visual%20Robot%20Model%20with%20URDF%20from%20Scratch

Booth replicating what's done there and cloning your repo, I can't see any mash or shape in rviz, only transformations; here's what I see from chap.4 code:

image description

There should be cylinders and squares...

Anyone experiencing this issue? I'm running ROS Lunar, Ubuntu 17.04 x64 on VirtualBox 5.1.18 (with "3D acceleration" disabled because i don't know why, if it's enabled rviz trows segmentation faults at start)

Side note: chap.1 I think it's buggy because with no joints there's not any "base_link" transformation supplied by joint_state_publisher, and Rviz go crazy...

Path to rviz config is wrong

Since the files were moved into a subdirectory path to the RVIZ config file has to be changed accordingly.
In xacrodisplay.launch and display.launch the RVIZ node invocation line

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_tutorial)/urdf.rviz" />

has to be updated to

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find urdf_tutorial)/urdf_tutorial/urdf.rviz" />

where to get urdf_launch package?

Hi,

I am trying to install this package for ROS2 - Humble. When I run rosdep, I get the following error:

'Unable to locate package ros-humble-urdf-launch'

How can I install the urdf-launch package for humble distro?

No robot model when using display.launch (again)

Similar to #4. Seems the commits merged in PR #5 did not take the install location specified in the CMakeLists.txt into account.

AFAIU the current layout of the package will make it work either in the source / devel workspace, or the install workspace (due to present / missing urdf_tutorial/ subdir). I can change the launch files or the CMakeLists.txt, but don't know what the preferred situation is.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.