Functions | Variables
generate_urdf Namespace Reference

Functions

def add_dummy_collision
def add_dummy_inertia
def add_gazebo_tags
def add_transmission_tags
def adjustMeshPath
def create_visual_xacro
 Meshes #####.
def define_materials
 FUNCTIONS ####.
def export_kinematic_chain_to_xacro
def export_list_to_xacro
def export_robot_element
 XACRO FUNCTIONS ########.
def export_robot_to_xacro_files
def REP120_compatibility
def write_comments_in_xacro

Variables

tuple args = parser.parse_args()
 Main ####.
string cmd = 'rospack find '
string COLLISION_SUFFIX = '_0.10.stl'
string default = 'true'
 LINKS_DICO = dico.Nao_links
string MESHPKG = '_meshes'
string NAME = 'nao'
dictionary NAO_XACRO_DICO
 OFFSETS_DICO = dico.Nao_offsets
tuple OUTPUT
tuple parser = argparse.ArgumentParser(usage='Load an URDF file')
tuple path_mesh_pkg
tuple pathdescription
dictionary PEPPER_XACRO_DICO
tuple robot = URDF.from_parameter_server()
dictionary ROMEO_XACRO_DICO
float SCALE = 0.1
list VERSION = robot.name[robot.name.find('V'):]
 VISU_DICO = dico.Nao_visu
 XACRO_DICO = NAO_XACRO_DICO

Function Documentation

Add a Box collision tag to every links containing keyword in list.

Definition at line 253 of file generate_urdf.py.

Add a dummy Inertial tag to every links containing keyword in list.

Definition at line 243 of file generate_urdf.py.

Should instanciate all gazebo tags.

    - sensor plugins
    - mimic joints plugins
    - ros_control plugin
    - disable_links plugins
    - gazebo reference for every link (ok)
for now naoGazebo.xacro has been done by hand based on the work of
Konstantinos Chatzilygeroudis in his nao_dcm project
https://github.com/costashatz/nao_dcm

Definition at line 226 of file generate_urdf.py.

Should instanciate all transmission tags.

- hardware interface
- mechanical reduction ratio for each motor
- joint and actuator to which the transmission tag reference
for now naoTransmission.xacro has been done by hand based on the work
of Konstantinos Chatzilygeroudis in his nao_dcm project
https://github.com/costashatz/nao_dcm

Definition at line 211 of file generate_urdf.py.

def generate_urdf.adjustMeshPath (   path_mesh_pkg,
  link 
)
Find the path of a mesh according to the link definition.

Set the visual and collision element of the given link

:param : path_mesh_pkg, absolute path of the package where the meshes
should be located
:param : link, dictionary key of the link we want to set
visual and collision parameters

:return : tempVisu, Visual element with the NAO visual geometrical shape
for people who don't have the meshes
:return : tempCol, Collision element with the NAO collision geometrical
shape for people who don't have the meshes

Definition at line 567 of file generate_urdf.py.

Meshes #####.

Create a <ROBOT>_visual_collision.xacro file.

with xacro macros for visual and collision tags of the urdf.
This function creates xacro macros for visualisation and collisions.
It checks if the meshes are on the computer and set the 'meshes_installed'
property accordingly

Definition at line 268 of file generate_urdf.py.

FUNCTIONS ####.

Create a few materials.

to display geometrical shapes in a given color.

Definition at line 79 of file generate_urdf.py.

def generate_urdf.export_kinematic_chain_to_xacro (   keyword,
  baseChain = 'base_link',
  tipRefChain = 'default' 
)
Export a specific kinematic chain to a xacro file.

:param : keyword, string defining kinematic chains to export
(legs,arms,head,torso)
:param : baseChain, string representing the name of the link where
the reference chain starts
:param : tipRefChain, string representing the name of the link where
the reference chain ends

Definition at line 443 of file generate_urdf.py.

def generate_urdf.export_list_to_xacro (   list,
  filename 
)
Export all links containing a string and its parent joint.

:param : list, list of strings to look for
:param : filename, absolute path of the file to write to

Definition at line 545 of file generate_urdf.py.

XACRO FUNCTIONS ########.

Export the 'elements' related to the keyword 'element'.

:param : element, string in ['Transmission', 'Gazebo', 'material']

The output file is <ROBOT>_<element>.xacro

Definition at line 346 of file generate_urdf.py.

Export the entire 'robot' in several xacro files.

One xacro file per kinematic chain (<ROBOT>_legs.xacro,
<ROBOT>_arms.xacro, <ROBOT>_torso.xacro...)
Xacro file for specific parts of the robot (<ROBOT>_fingers.xacro,
<ROBOT>_sensors.xacro)
One xacro file for visual elements (<ROBOT>_visual_collision.xacro,
<ROBOT>_material.xacro)
One xacro file per type of element needed for gazebo simulation
(<ROBOT>_Gazebo.xacro, <ROBOT>_Transmission.xacro)
One generic robot file which includes all the other ones
(<ROBOT>_robot.xacro)

Definition at line 379 of file generate_urdf.py.

Add frames defined by ROS for humanoid robots.

(REP120): http://www.ros.org/reps/rep-0120.html

Definition at line 91 of file generate_urdf.py.

def generate_urdf.write_comments_in_xacro (   doc,
  filename 
)
Write the content of the XML Document doc to a file named filename.

Also add comments at the beginning of the file

:param : doc, minidom Document to write
:param : filename, absolute path of the file to write to

Definition at line 517 of file generate_urdf.py.


Variable Documentation

tuple generate_urdf::args = parser.parse_args()

Main ####.

Definition at line 640 of file generate_urdf.py.

string generate_urdf::cmd = 'rospack find '

Definition at line 698 of file generate_urdf.py.

string generate_urdf::COLLISION_SUFFIX = '_0.10.stl'

Definition at line 63 of file generate_urdf.py.

string generate_urdf::default = 'true'

Definition at line 68 of file generate_urdf.py.

generate_urdf::LINKS_DICO = dico.Nao_links

Definition at line 659 of file generate_urdf.py.

string generate_urdf::MESHPKG = '_meshes'

Definition at line 663 of file generate_urdf.py.

string generate_urdf::NAME = 'nao'

Definition at line 652 of file generate_urdf.py.

Initial value:
00001 {
00002     'head': 'gaze',
00003     'legs': 'sole',
00004     'arms': 'gripper',
00005     'torso': 'torso',
00006     }

Definition at line 41 of file generate_urdf.py.

generate_urdf::OFFSETS_DICO = dico.Nao_offsets

Definition at line 661 of file generate_urdf.py.

Initial value:
00001 os.path.join(pathdescription, 'urdf', NAME + VERSION +
00002     '_generated_urdf', NAME + '.urdf')

Definition at line 705 of file generate_urdf.py.

tuple generate_urdf::parser = argparse.ArgumentParser(usage='Load an URDF file')

Definition at line 65 of file generate_urdf.py.

Initial value:
00001 subprocess.check_output(cmd, stderr=subprocess.STDOUT,
00002         shell=True)

Definition at line 711 of file generate_urdf.py.

Initial value:
00001 subprocess.check_output(cmd,
00002         stderr=subprocess.STDOUT, shell=True)

Definition at line 700 of file generate_urdf.py.

Initial value:
00001 {
00002     'head': 'Head',
00003     'legs': 'base_footprint',
00004     'arms': 'gripper',
00005     'torso': 'torso',
00006     }

Definition at line 56 of file generate_urdf.py.

tuple generate_urdf::robot = URDF.from_parameter_server()

Definition at line 642 of file generate_urdf.py.

Initial value:
00001 {
00002     'head': 'gaze',
00003     'legs': 'sole',
00004     'arms': 'gripper',
00005     'torso': 'body',
00006     'eyes': 'Eye',
00007     }

Definition at line 48 of file generate_urdf.py.

float generate_urdf::SCALE = 0.1

Definition at line 664 of file generate_urdf.py.

string generate_urdf::VERSION = robot.name[robot.name.find('V'):]

Definition at line 647 of file generate_urdf.py.

string generate_urdf::VISU_DICO = dico.Nao_visu

Definition at line 660 of file generate_urdf.py.

Definition at line 662 of file generate_urdf.py.



naoqi_tools
Author(s): Mikael Arguedas
autogenerated on Wed Aug 16 2017 02:28:16