Giter Site home page Giter Site logo

leggedrobotics / urdf2robcogen Goto Github PK

View Code? Open in Web Editor NEW
26.0 8.0 10.0 34 KB

A tool that translates a robot URDF description into the kindsl format that can be processed by RobCoGen.

License: BSD 3-Clause "New" or "Revised" License

CMake 5.63% C++ 94.37%
ros urdf rigid-body-dynamics robcogen kindsl

urdf2robcogen's Introduction

URDF2ROBCOGEN {#mainpage}

Authors: Jan Carius ([email protected]) and Ruben Grandia ([email protected]), based on an earlier version by Diego Pardo ([email protected])

Maintainers: Jan Carius ([email protected]) and Ruben Grandia ([email protected])

What is this repository for?

This tool generates the RobCoGen description files (.kindsl & .dtdsl) from a URDF description format.

Building

Build Status

Dependencies

Build the executable

We use catkin as a build system. To build the bare version use

catkin build urdf2robcogen

Build the documentation

We use rosdoc_lite with doxygen backend to build documentation for this catkin package.

rosdoc_lite /path/to/package

Usage

Two modes of operation are possible.

A) Run as standalone application (plain URDF file)

You must have a URDF description of your robot as a plaintext xml file. This should not contain xacro macros, i.e., you must invoke the xacro command beforehand to produce the URDF file.

To generate the robcogen description, execute

./urdf2robcogen_script RobotName /path/to/description.urdf

The generated files are written into the directory where the executable was executed (i.e., the output of pwd).

B) Using a launch file (xacro urdf file)

The urdf2robcogen.launch file converts a robot description on the parameter server.

roslaunch urdf2robcogen urdf2robcogen.launch robot_name:=myRobot description_name:=robot_description

See xacro_example.launch to see how to integrate this with generation of the robot description.

As a default, output files are placed in the /generated folder of this package.

Main differences between URDF and RobCoGen/Kindsl

  • URDF:

    • Frame rotations are extrinsic (rotations about a fixed frame)
    • The axis of rotation of the joints is set with the vector property 'axis' of the joint element
    • There is no concept of Frame
    • Artificial links are used to define frames (a.k.a., link_frames), they may or may not have inertia
    • Artificial Joints (usually fixed) are used to connect link_frames to the real links
    • It is common to find URDF with 'virtual' links for compatibility with other tools
    • Virtual links might have incomplete information (i.e., inertial parameters)
    • The inertial parameters are expressed w.r.t a frame at the CoM of the link
  • RobCoGen:

    • Frame rotations are intrinsic (rotations about the current frame)
    • Frame rotation order is x,y,z
    • The axis of rotation of the joint is always Z
    • Links always carry inertia and must have a parent joint that is moving (i.e., not fixed)
    • Additional frames can be defined at any link
    • Inertial parameters are expressed w.r.t. the link frame (i.e., the corresponding joint frame)
    • It includes a special feature to set a different frame for expressing the inertial parameters (ref_frame)

Caveats

  • Double-check the ordering of the joints/links in the generated files. They may differ from what you expect.

urdf2robcogen's People

Contributors

jcarius avatar rubengrandia 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

urdf2robcogen's Issues

I can't get kindsl from example

hi Thanks your good job,but when I try to test,I get the error,could you help me?

roslaunch urdf2robcogen urdf2robcogen.launch robot_name:=test_robot description_name:=/home/robot203/boshirobot/urdf_gen/src/urdf2robcogen/examples/floating_base.urdf
... logging to /home/robot203/.ros/log/b1ba9dfe-b635-11eb-a2f9-b42e9984ee6d/roslaunch-robot203-3985.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://robot203:41143/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /urdf2robcogen/description_name: /home/robot203/bo...
 * /urdf2robcogen/output_folder: /home/robot203/bo...
 * /urdf2robcogen/robot_name: test_robot
 * /urdf2robcogen/verbose: False

NODES
  /
    urdf2robcogen (urdf2robcogen/urdf2robcogen_node)

auto-starting new master
process[master]: started with pid [4004]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to b1ba9dfe-b635-11eb-a2f9-b42e9984ee6d
process[rosout-1]: started with pid [4015]
started core service [/rosout]
process[urdf2robcogen-2]: started with pid [4021]
terminate called after throwing an instance of 'ros::InvalidNameException'
  what():  Character [.] at element [75] is not valid in Graph Resource Name [/home/robot203/boshirobot/urdf_gen/src/urdf2robcogen/examples/floating_base.urdf].  Valid characters are a-z, A-Z, 0-9, / and _.
[urdf2robcogen-2] process has died [pid 4021, exit code -6, cmd /home/robot203/boshirobot/urdf_gen/devel/lib/urdf2robcogen/urdf2robcogen_node __name:=urdf2robcogen __log:=/home/robot203/.ros/log/b1ba9dfe-b635-11eb-a2f9-b42e9984ee6d/urdf2robcogen-2.log].
log file: /home/robot203/.ros/log/b1ba9dfe-b635-11eb-a2f9-b42e9984ee6d/urdf2robcogen-2*.log

I can't generate the kindsl file from my urdf file.

I use this tool to generate robcogen file but I get an error:

roslaunch urdf2robcogen cheetah2code.launch 
... logging to /home/zpl/.ros/log/0d0dd772-d0a7-11ea-987e-3413e89875f1/roslaunch-work-4531.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option.
started roslaunch server http://work:33891/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: melodic
 * /rosversion: 1.14.6
 * /urdf2robcogen/description_name: robot_description
 * /urdf2robcogen/output_folder: /home/zpl/local/s...
 * /urdf2robcogen/robot_name: cheetah
 * /urdf2robcogen/verbose: True

NODES
  /
    urdf2robcogen (urdf2robcogen/urdf2robcogen_node)

auto-starting new master
process[master]: started with pid [4544]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 0d0dd772-d0a7-11ea-987e-3413e89875f1
process[rosout-1]: started with pid [4555]
started core service [/rosout]
process[urdf2robcogen-2]: started with pid [4558]
[urdf2robcogen] Start generating files.
urdf2robcogen_node: /home/zpl/local/src/cheetah_catkin_ws/src/urdf2robcogen/src/Utils.cpp:63: Eigen::Matrix3d expressInertiaFromFrameAInComFrame(Eigen::Matrix3d, double, PoseInWorld, PoseInWorld): Assertion `isValidInertiaMatrix(C_I_C)' failed.
[urdf2robcogen-2] process has died [pid 4558, exit code -6, cmd /home/zpl/local/src/cheetah_catkin_ws/devel/lib/urdf2robcogen/urdf2robcogen_node __name:=urdf2robcogen __log:=/home/zpl/.ros/log/0d0dd772-d0a7-11ea-987e-3413e89875f1/urdf2robcogen-2.log].
log file: /home/zpl/.ros/log/0d0dd772-d0a7-11ea-987e-3413e89875f1/urdf2robcogen-2*.log

why this error urdf2robcogen_node: /home/zpl/local/src/cheetah_catkin_ws/src/urdf2robcogen/src/Utils.cpp:63: Eigen::Matrix3d expressInertiaFromFrameAInComFrame(Eigen::Matrix3d, double, PoseInWorld, PoseInWorld): Assertion isValidInertiaMatrix(C_I_C)' failed.` occur?
The urdf file is correct when I spawn it to gazebo.
How can I solve this?

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.