Functions | Variables
generate_urdf Namespace Reference

Functions

def add_dummy_collision (list)
 
def add_dummy_inertia (list)
 
def add_gazebo_tags ()
 
def add_transmission_tags ()
 
def adjustMeshPath (path_mesh_pkg, link)
 
def create_visual_xacro ()
 Meshes #####. More...
 
def define_materials ()
 FUNCTIONS ####. More...
 
def export_kinematic_chain_to_xacro (keyword, baseChain='base_link', tipRefChain='default')
 
def export_list_to_xacro (list, filename)
 
def export_robot_element (element)
 XACRO FUNCTIONS ########. More...
 
def export_robot_to_xacro_files ()
 
def REP120_compatibility ()
 
def write_comments_in_xacro (doc, filename)
 

Variables

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

Function Documentation

def generate_urdf.add_dummy_collision (   list)
Add a Box collision tag to every links containing keyword in list.

Definition at line 253 of file generate_urdf.py.

def generate_urdf.add_dummy_inertia (   list)
Add a dummy Inertial tag to every links containing keyword in list.

Definition at line 243 of file generate_urdf.py.

def generate_urdf.add_gazebo_tags ( )
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.

def generate_urdf.add_transmission_tags ( )
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.

def generate_urdf.create_visual_xacro ( )

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.

def generate_urdf.define_materials ( )

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 444 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.

def generate_urdf.export_robot_element (   element)

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.

def generate_urdf.export_robot_to_xacro_files ( )
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.

def generate_urdf.REP120_compatibility ( )
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

generate_urdf.args = parser.parse_args()

Main ####.

Definition at line 640 of file generate_urdf.py.

generate_urdf.choices

Definition at line 67 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.

generate_urdf.default

Definition at line 66 of file generate_urdf.py.

generate_urdf.help

Definition at line 66 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.

dictionary generate_urdf.NAO_XACRO_DICO
Initial value:
1 = {
2  'head': 'gaze',
3  'legs': 'sole',
4  'arms': 'gripper',
5  'torso': 'torso',
6  }

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.

generate_urdf.OUTPUT
Initial value:
1 = os.path.join(pathdescription, 'urdf', NAME + VERSION +
2  '_generated_urdf', NAME + '.urdf')

Definition at line 705 of file generate_urdf.py.

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

Definition at line 65 of file generate_urdf.py.

generate_urdf.path_mesh_pkg
Initial value:
1 = subprocess.check_output(cmd, stderr=subprocess.STDOUT,
2  shell=True)[:-1]

Definition at line 711 of file generate_urdf.py.

generate_urdf.pathdescription
Initial value:
1 = subprocess.check_output(cmd,
2  stderr=subprocess.STDOUT, shell=True)[:-1]

Definition at line 700 of file generate_urdf.py.

dictionary generate_urdf.PEPPER_XACRO_DICO
Initial value:
1 = {
2  'head': 'Head',
3  'legs': 'base_footprint',
4  'arms': 'gripper',
5  'torso': 'torso',
6  }

Definition at line 56 of file generate_urdf.py.

generate_urdf.robot = URDF.from_parameter_server()

Definition at line 642 of file generate_urdf.py.

dictionary generate_urdf.ROMEO_XACRO_DICO
Initial value:
1 = {
2  'head': 'gaze',
3  'legs': 'sole',
4  'arms': 'gripper',
5  'torso': 'body',
6  'eyes': 'Eye',
7  }

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.

generate_urdf.XACRO_DICO = NAO_XACRO_DICO

Definition at line 662 of file generate_urdf.py.



naoqi_tools
Author(s): Mikael Arguedas
autogenerated on Thu Jul 16 2020 03:18:37