Drake
drake::parsers::urdf Namespace Reference

Functions

ModelInstanceIdTable AddModelInstanceFromUrdfStringWithRpyJointToWorld (const std::string &urdf_string, RigidBodyTree< double > *tree)
 Reads a URDF model specified by urdf_string and adds an instance of it to tree. More...
 
ModelInstanceIdTable AddModelInstanceFromUrdfString (const string &urdf_string, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfStringWithRpyJointToWorldSearchingInRosPackages (const std::string &urdf_string, const PackageMap &package_map, RigidBodyTree< double > *tree)
 This method is the same as AddModelInstanceFromUrdfStringWithRpyJointToWorld() except it has an additional parameter called package_map. More...
 
ModelInstanceIdTable AddModelInstanceFromUrdfString (const string &urdf_string, const PackageMap &package_map, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfString (const string &urdf_string, const PackageMap &package_map, const string &root_dir, const drake::multibody::joints::FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfString (const string &urdf_string, const string &root_dir, const FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfStringSearchingInRosPackages (const string &urdf_string, const PackageMap &package_map, const string &root_dir, const FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFileWithRpyJointToWorld (const std::string &urdf_filename, RigidBodyTree< double > *tree)
 Reads a URDF model specified by urdf_filename and adds an instance of it to tree. More...
 
ModelInstanceIdTable AddModelInstanceFromUrdfFile (const string &filename, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFileToWorld (const string &filename, const FloatingBaseType floating_base_type, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFile (const string &filename, const FloatingBaseType floating_base_type, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFile (const string &filename, const FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFileSearchingInRosPackages (const string &filename, const PackageMap &package_map, const FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFile (const string &filename, const PackageMap &package_map, const FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 
std::shared_ptr< RigidBodyFrame< double > > MakeRigidBodyFrameFromUrdfNode (const RigidBodyTree< double > &tree, const tinyxml2::XMLElement &link, const tinyxml2::XMLElement *pose, const std::string &name, int model_instance_id)
 Manufactures a RigidBodyFrame from the given URDF link and pose XML nodes. More...
 
DRAKE_DEPRECATED("Please use AddModelInstanceFromUrdfStringWithRpyJointToWorldSearchingInRosPackages().") ModelInstanceIdTable AddModelInstanceFromUrdfString(const std ModelInstanceIdTable AddModelInstanceFromUrdfString (const std::string &urdf_string, const std::string &root_dir, const drake::multibody::joints::FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 Reads a URDF model specified by urdf_string and adds an instance of it to tree. More...
 
ModelInstanceIdTable AddModelInstanceFromUrdfStringSearchingInRosPackages (const std::string &urdf_string, const PackageMap &package_map, const std::string &root_dir, const drake::multibody::joints::FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 This method is the same as AddModelInstanceFromUrdfString() except it has an additional parameter called package_map. More...
 
DRAKE_DEPRECATED("Please use AddModelInstanceFromUrdfFileWithRpyJointToWorld().") ModelInstanceIdTable AddModelInstanceFromUrdfFile(const std ModelInstanceIdTable AddModelInstanceFromUrdfFileToWorld (const std::string &urdf_filename, const drake::multibody::joints::FloatingBaseType floating_base_type, RigidBodyTree< double > *tree)
 Reads a URDF model specified by urdf_filename and adds an instance of it to tree. More...
 
ModelInstanceIdTable AddModelInstanceFromUrdfFile (const std::string &urdf_filename, const drake::multibody::joints::FloatingBaseType floating_base_type, RigidBodyTree< double > *tree)
 
ModelInstanceIdTable AddModelInstanceFromUrdfFile (const std::string &urdf_filename, const drake::multibody::joints::FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 Reads a URDF model specified by urdf_filename and adds an instance of it to tree. More...
 
ModelInstanceIdTable AddModelInstanceFromUrdfFileSearchingInRosPackages (const std::string &urdf_filename, const PackageMap &package_map, const drake::multibody::joints::FloatingBaseType floating_base_type, std::shared_ptr< RigidBodyFrame< double >> weld_to_frame, RigidBodyTree< double > *tree)
 This method is the same as AddModelInstanceFromUrdfFile() except it has an additional parameter called package_map. More...
 

Function Documentation

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFile ( const std::string &  urdf_filename,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
RigidBodyTree< double > *  tree 
)
ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFile ( const std::string &  urdf_filename,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Reads a URDF model specified by urdf_filename and adds an instance of it to tree.

Let the "base bodies" be the bodies in the model that do not have parent joints. This method connects the base bodies to an existing body in the tree using joints of type floating_base_type. The body in the tree to which the base bodies are attached and the transform between this body and the base bodies when the joints are in their zero positions is specified by weld_to_frame.

This method can only be used with URDF models that either (1) do not use package:// to reference modeling resources like mesh files, or (2) only reference packages that are defined up the directory tree relative to urdf_filename. URDF files that contain package:// references that do not meet these requirements should instead use AddModelInstanceFromUrdfFileSearchingInRosPackages().

Parameters
[in]urdf_filenameThe name of the file containing the URDF model. A new instance of this model is created and added to tree.
[in]floating_base_typeThe type of joint that connects the model instance's root to the tree.
[in]weld_to_frameThe frame to which to connect the new model instance.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to the RigidBodyTree to their instance IDs, which are unique within the RigidBodyTree.
ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFile ( const string &  filename,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFile ( const string &  filename,
const FloatingBaseType  floating_base_type,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFile ( const string &  filename,
const FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFile ( const string &  filename,
const PackageMap package_map,
const FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFileSearchingInRosPackages ( const std::string &  urdf_filename,
const PackageMap package_map,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

This method is the same as AddModelInstanceFromUrdfFile() except it has an additional parameter called package_map.

Parameter package_map contains a mapping from ROS package names to their paths on the local file system. The mapping is used to find resources like mesh files that are referenced within the URDF. This method may be called from within the context of a ROS node or a regular non-ROS application.

This method has input parameter package_map. This parameter is only necessary if the URDF contains a model that references meshes and other modeling resources using package://. If the model in the URDF does not use package://, the URDF could instead be loaded using AddModelInstanceFromUrdfFile().

Parameters
[in]urdf_filenameThe name of the file containing the URDF model. An instance of this model will be added to tree.
[in]package_mapA map of ROS package names to their paths. These are the packages to search through when finding files referenced in the URDF.
[in]floating_base_typeThe type of joint that connects the model instance's root to the tree.
[in]weld_to_frameThe frame to which to connect the new model instance.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to the RigidBodyTree to their instance IDs, which are unique within the RigidBodyTree.
ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFileSearchingInRosPackages ( const string &  filename,
const PackageMap package_map,
const FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Here is the caller graph for this function:

DRAKE_DEPRECATED ("Please use AddModelInstanceFromUrdfFileWithRpyJointToWorld().") ModelInstanceIdTable AddModelInstanceFromUrdfFile( const std ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFileToWorld ( const std::string &  urdf_filename,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
RigidBodyTree< double > *  tree 
)

Reads a URDF model specified by urdf_filename and adds an instance of it to tree.

Let the "base bodies" be the bodies in the model that do not have parent joints. This method connects the model instance's base bodies to the world via joints of type floating_base_type. When these joints are at their zero positions, the base bodies' frames are coincident with the world's coordinate frame.

This method can only be used with URDF models that either (1) do not use package:// to reference modeling resources like mesh files, or (2) only reference packages that are defined up the directory tree relative to urdf_filename. URDF files that contain package:// references that do not meet these requirements should instead use AddModelInstanceFromUrdfFileSearchingInRosPackages().

Parameters
[in]urdf_filenameThe name of the file containing a URDF description of the model. An instance of this model will be added to tree.
[in]floating_base_typeThe type of joint that connects the model instance's root to tree.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to the RigidBodyTree to their instance IDs, which are unique within the RigidBodyTree.
ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFileToWorld ( const string &  filename,
const FloatingBaseType  floating_base_type,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

Here is the caller graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfFileWithRpyJointToWorld ( const std::string &  urdf_filename,
RigidBodyTree< double > *  tree 
)

Reads a URDF model specified by urdf_filename and adds an instance of it to tree.

Let the "base bodies" be the bodies in the model that do not have parent joints. This method connects the model instance's base bodies to the world via multibody::joints::kRollPitchYaw joints. When this joint is at its zero position, the base bodies' frames are coincident with the world's coordinate frame.

This method can only be used with URDF models that either (1) do not use package:// to reference modeling resources like mesh files, or (2) only reference packages that are defined up the directory tree relative to urdf_filename. URDF files that contain package:// references that do not meet these requirements should instead use AddModelInstanceFromUrdfFileSearchingInRosPackages().

Parameters
[in]urdf_filenameThe name of the file containing the URDF model.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to tree to their instance IDs, which are unique within tree.

Here is the call graph for this function:

Here is the caller graph for this function:

DRAKE_DEPRECATED ("Please use AddModelInstanceFromUrdfStringWithRpyJointToWorldSearchingInRosPackages().") ModelInstanceIdTable AddModelInstanceFromUrdfString( const std ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfString ( const std::string &  urdf_string,
const std::string &  root_dir,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Reads a URDF model specified by urdf_string and adds an instance of it to tree.

Let the "base bodies" be the bodies in the model that do not have parent joints. This method connects the base bodies to an existing body in tree via joints of type floating_base_type. The body in the tree to which to which these joints attach and the transform between this body and the base bodies' frames when the joints are in their zero positions is determined by weld_to_frame.

This method can only be used with URDF models that do not use package:// to reference modeling resources like mesh files. URDF models that contain package:// should instead use AddModelInstanceFromUrdfStringSearchingInRosPackages().

Parameters
[in]urdf_stringThe URDF string of the model. This is the actual URDF text (i.e., it is not the name of a file that contains the URDF text). A new model instance is created based on this URDF text and added to tree.
[in]root_dirThe root directory in which to search for files mentioned in the URDF.
[in]floating_base_typeThe type of joint that connects the model instance's root to tree.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to the RigidBodyTree to their instance IDs, which are unique within the RigidBodyTree.
ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfString ( const string &  urdf_string,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfString ( const string &  urdf_string,
const PackageMap package_map,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfString ( const string &  urdf_string,
const PackageMap package_map,
const string &  root_dir,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfString ( const string &  urdf_string,
const string &  root_dir,
const FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Here is the call graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfStringSearchingInRosPackages ( const std::string &  urdf_string,
const PackageMap package_map,
const std::string &  root_dir,
const drake::multibody::joints::FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

This method is the same as AddModelInstanceFromUrdfString() except it has an additional parameter called package_map.

Parameter package_map contains a mapping from ROS package names to their paths on the local file system. The mapping is used to find resources like mesh files that are referenced within the URDF. This method may be called from within the context of a ROS node or a regular non-ROS application.

This method has input parameter package_map. This parameter is only necessary if the URDF contains a model that references meshes and other modeling resources using package://. If the model in the URDF does not use package://, the URDF could instead be loaded using AddModelInstanceFromUrdfString().

Parameters
[in]urdf_stringThe URDF string of the model. This is the actual URDF text (i.e., it is not the name of a file that contains the URDF text). A new model instance is created based on this URDF text and added to tree.
[in]package_mapA map of ROS package names to their paths. These are the packages to search through when finding files referenced in the URDF.
[in]root_dirThe root directory in which to search for files mentioned in the URDF.
[in]floating_base_typeThe type of joint that connects the model instance's root to tree.
[in]weld_to_frameThe frame to which to connect the new model instance.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to the RigidBodyTree to their instance IDs, which are unique within the RigidBodyTree.
ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfStringSearchingInRosPackages ( const string &  urdf_string,
const PackageMap package_map,
const string &  root_dir,
const FloatingBaseType  floating_base_type,
std::shared_ptr< RigidBodyFrame< double >>  weld_to_frame,
RigidBodyTree< double > *  tree 
)

Here is the caller graph for this function:

ModelInstanceIdTable AddModelInstanceFromUrdfStringWithRpyJointToWorld ( const std::string &  urdf_string,
RigidBodyTree< double > *  tree 
)

Reads a URDF model specified by urdf_string and adds an instance of it to tree.

Let the "base bodies" be the bodies in the model that do not have parent joints. The base bodies are connected to the world via multibody::joints::kRollPitchYaw joints. When these joints are at their zero positions, the base body's frames are coincident with the world's coordinate frame.

This method can only be used with URDF models that do not use package:// to reference modeling resources like mesh files. URDF models that contain package:// should instead use AddModelInstanceFromUrdfStringWithRpyJointToWorldSearchingInRosPackages().

Parameters
[in]urdf_stringThe URDF string of the model. This is the actual URDF text (i.e., it is not the name of a file that contains the URDF text). A new model instance is created based on this URDF text and added to tree.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to tree to their instance IDs, which are unique within tree.

Here is the call graph for this function:

Here is the caller graph for this function:

ModelInstanceIdTable drake::parsers::urdf::AddModelInstanceFromUrdfStringWithRpyJointToWorldSearchingInRosPackages ( const std::string &  urdf_string,
const PackageMap package_map,
RigidBodyTree< double > *  tree 
)

This method is the same as AddModelInstanceFromUrdfStringWithRpyJointToWorld() except it has an additional parameter called package_map.

Parameter package_map contains a mapping from ROS package names to their paths on the local file system. The mapping is used to find resources like mesh files that are referenced within the URDF. This method may be called from within the context of a ROS node or a regular non-ROS application.

This method has input parameter package_map. This parameter is only necessary if the URDF contains a model that references meshes and other modeling resources using package://. If the model in the URDF does not use package://, the URDF could instead be loaded using AddModelInstanceFromUrdfStringWithRpyJointToWorld().

Parameters
[in]urdf_stringThe URDF string of the model. This is the actual URDF text (i.e., it is not the name of a file that contains the URDF text). A new model instance is created based on this URDF text and added to tree.
[in]package_mapA map of ROS package names to their paths. These are the packages to search through when searching for files referenced in the URDF.
[out]treeThe RigidBodyTree to which to add the model instance. This parameter must not be nullptr.
Returns
A table mapping the names of the models whose instances were just added to the RigidBodyTree to their instance IDs, which are unique within the RigidBodyTree.

Here is the call graph for this function:

Here is the caller graph for this function:

std::shared_ptr< RigidBodyFrame< double > > MakeRigidBodyFrameFromUrdfNode ( const RigidBodyTree< double > &  tree,
const tinyxml2::XMLElement &  link,
const tinyxml2::XMLElement *  pose,
const std::string &  name,
int  model_instance_id 
)

Manufactures a RigidBodyFrame from the given URDF link and pose XML nodes.

The link name must exist in the given model. Otherwise, a runtime error is thrown.

Parameters
[in]treeThe rigid body tree that holds the rigid body to which the new RigidBodyFrame is attached.
[in]linkThe URDF XML node describing the rigid body to which the new RigidBodyFrame is attached.
[in]poseThe URDF XML node describing the pose of the new RigidBodyFrame in the frame of the rigid body to which it is attached. If this is nullptr, a pose of zero (i.e., identity transform) is used.
[in]nameThe name of the new RigidBodyFrame.
[in]model_instance_idThe instance ID of the model to which the frame belongs.
Returns
The new RigidBodyFrame.
Exceptions
std::runtime_errorif the rigid body to which the new RigidBodyFrame is attached is not found.

Here is the call graph for this function: