[Documentation] [TitleIndex] [WordIndex

Only released in EOL distros:  

nxt: nxt_controllers | nxt_description | nxt_lxf2urdf | nxt_msgs | nxt_python | nxt_ros | nxt_rviz_plugin

Package Summary

nxt_lxf2urdf converts a LEGO Digital Design file (*.lxf) to urdf . nxt_lxf2urdf needs a (*.lxf) and a (*.ldr) file for completing the conversion from lxf to urdf. It also has the ldraw.xml file that is in the assests folder of the LEGO Digital Designer which has been modified to add more parts.

nxt: nxt_controllers | nxt_description | nxt_lxf2urdf | nxt_msgs | nxt_python | nxt_ros | nxt_rviz_plugin

Package Summary

nxt_lxf2urdf converts a LEGO Digital Design file (*.lxf) to urdf . nxt_lxf2urdf needs a (*.lxf) and a (*.ldr) file for completing the conversion from lxf to urdf. It also has the ldraw.xml file that is in the assests folder of the LEGO Digital Designer which has been modified to add more parts.

Where to Start

Download Lego Digital Designer (LDD). Then replace the ldraw.xml in the assets folder of Lego Digital Designer with the ldraw.xml file provided in this package. The ldraw.xml file defines a part mapping from the Lego pieces in LDD to the ldraw.org models.

Once you have overwritten the ldraw.xml file, create a Lego robot using the NXT parts in LDD. Save the LDD file as an *.lxf file and export it as *.ldr file. Currently nxt_dscriptions has a subset of the ldraw.org parts library converted to Collada meshes, so not all parts will be modelled in rviz. We are still looking for ways to make converting the ldraw models to Collada.

Converting the Model

Now that you have created and exported the *.lxf and *.ldr files, run the conversion program nxt_lxf2urdf.py and pipe the output into a urdf file.

rosrun nxt_lxf2urdf nxt_lxf2urdf.py robot.lxf robot.ldr > robot.urdf

Labelling and Positioning the Sensors and Motors

Looking at the model generated in rviz will reveal that the sensors and motors are in odd positions with generic names. The positions and orientations of the sensors have been shifted so that the axes are X forward and the origins properly located in the body of the sensor. Inside the urdf there are comments marking the individual sensors and motors. Start by renaming the motors and sensors according to the names in your robot.yaml file. Then change the joint origins for each sensors so that they look like the original model in LDD.


2019-07-20 12:58