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 = 'robot'
list filename = OUTPUT[0:OUTPUT.rfind('.')]
 Transmission elements not available from Aldebaran libraries yet export_robot_element('Transmission') root.appendChild(ur.short(doc,'xacro:include','filename', NAME + '_Transmission.xacro')) Gazebo Plugin not available from Aldebaran libraries yet export_robot_element('Gazebo') root.appendChild(ur.short(doc,'xacro:include','filename', NAME + '_Gazebo.xacro'))
string help = 'Rename the links to be REP120 compliant'
 LINKS_DICO = dico.Nao_links
string MESHPKG = "_meshes"
string NAME = 'nao'
dictionary NAO_XACRO_DICO
 OFFSETS_DICO = dico.Nao_offsets
tuple OUTPUT = os.path.join(pathdescription,'urdf', NAME + VERSION + '_generated_urdf', NAME + '.urdf')
tuple parser = argparse.ArgumentParser(usage='Load an URDF file')
tuple path_mesh_pkg = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
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

This function add a Box collision tag to every links containing keyword provided in list :

Definition at line 217 of file generate_urdf.py.

Definition at line 209 of file generate_urdf.py.

Definition at line 195 of file generate_urdf.py.

Definition at line 183 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 494 of file generate_urdf.py.

Meshes #####.

Definition at line 231 of file generate_urdf.py.

FUNCTIONS ####.

Create a few materials to display geometrical shapes in a given color

Definition at line 75 of file generate_urdf.py.

def generate_urdf.export_kinematic_chain_to_xacro (   keyword,
  baseChain = 'base_link',
  tipRefChain = 'default' 
)
This function allows to 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 379 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 471 of file generate_urdf.py.

XACRO FUNCTIONS ########.

Browse the 'elements' list of robot instance
and export the ones related to the keyword 'element' given as a parameter

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

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

Definition at line 301 of file generate_urdf.py.

Exports 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 334 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 85 of file generate_urdf.py.

def generate_urdf.write_comments_in_xacro (   doc,
  filename 
)
Writes the content of the XML Document doc to a file named filename and 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 448 of file generate_urdf.py.


Variable Documentation

Main ####.

Definition at line 548 of file generate_urdf.py.

string generate_urdf::cmd = "rospack find "

Definition at line 606 of file generate_urdf.py.

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

Definition at line 62 of file generate_urdf.py.

Definition at line 69 of file generate_urdf.py.

list generate_urdf::filename = OUTPUT[0:OUTPUT.rfind('.')]

Transmission elements not available from Aldebaran libraries yet export_robot_element('Transmission') root.appendChild(ur.short(doc,'xacro:include','filename', NAME + '_Transmission.xacro')) Gazebo Plugin not available from Aldebaran libraries yet export_robot_element('Gazebo') root.appendChild(ur.short(doc,'xacro:include','filename', NAME + '_Gazebo.xacro'))

Definition at line 375 of file generate_urdf.py.

string generate_urdf::help = 'Rename the links to be REP120 compliant'

Definition at line 67 of file generate_urdf.py.

generate_urdf::LINKS_DICO = dico.Nao_links

Definition at line 567 of file generate_urdf.py.

string generate_urdf::MESHPKG = "_meshes"

Definition at line 571 of file generate_urdf.py.

string generate_urdf::NAME = 'nao'

Definition at line 560 of file generate_urdf.py.

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

Definition at line 40 of file generate_urdf.py.

generate_urdf::OFFSETS_DICO = dico.Nao_offsets

Definition at line 569 of file generate_urdf.py.

tuple generate_urdf::OUTPUT = os.path.join(pathdescription,'urdf', NAME + VERSION + '_generated_urdf', NAME + '.urdf')

Definition at line 613 of file generate_urdf.py.

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

Definition at line 64 of file generate_urdf.py.

tuple generate_urdf::path_mesh_pkg = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)

Definition at line 617 of file generate_urdf.py.

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

Definition at line 608 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 55 of file generate_urdf.py.

tuple generate_urdf::robot = URDF.from_parameter_server()

Definition at line 550 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 47 of file generate_urdf.py.

float generate_urdf::SCALE = 0.1

Definition at line 572 of file generate_urdf.py.

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

Definition at line 555 of file generate_urdf.py.

string generate_urdf::VISU_DICO = dico.Nao_visu

Definition at line 568 of file generate_urdf.py.

Definition at line 570 of file generate_urdf.py.



naoqi_tools
Author(s): Mikael Arguedas
autogenerated on Thu Aug 27 2015 14:05:48