Directive to add a model from a URDF or SDFormat file to a scene, using a given name for the added instance.
#include <drake/multibody/parsing/model_directives.h>
Public Member Functions | |
bool | IsValid () const |
template<typename Archive > | |
void | Serialize (Archive *a) |
Public Attributes | |
std::string | file |
The package:// URI of the file to add. More... | |
std::string | name |
The model instance name. More... | |
std::map< std::string, Eigen::VectorXd > | default_joint_positions |
Map of joint_name => default position vector. More... | |
std::map< std::string, drake::schema::Transform > | default_free_body_pose |
Map of body_name or frame_name => default free body pose. More... | |
bool IsValid | ( | ) | const |
void Serialize | ( | Archive * | a | ) |
std::map<std::string, drake::schema::Transform> default_free_body_pose |
Map of body_name or frame_name => default free body pose.
The name must be a name within the scope of the model added by this directive. The name must not be scoped (i.e., no "foo::link", just "link"). If the name is empty, then the posed frame will be the body frame of the model's sole body (and if the model has >1 body then it is an error).
However, the schema::Transform associated with that named body/frame can define a base_frame
referring to any frame that has been added prior to or including this declaration. The named frame must always be a scoped name, even if its part of the model added by this directive.
base_frame
is not the world (explicitly or implicitly by omission):base_frame
. When interpreting the qs for the "named" body, it is the six-dof pose of the body measured and expressed in the parent frame (transform's base_frame
). This is true whether setting the position values in the resulting joint directly or using the MultibodyPlant free body APIs.std::map<std::string, Eigen::VectorXd> default_joint_positions |
Map of joint_name => default position vector.
Each joint name must be a name within the scope of the model added by this directive. The name must not contains this model's scoped name (nor that of any previously added model).
std::string file |
The package://
URI of the file to add.
std::string name |
The model instance name.