template<typename T>
class drake::multibody::PlanarJoint< T >
This joint models a planar joint allowing two bodies to translate and rotate relative to one another in a plane with three degrees of freedom.
That is, given a frame F attached to the parent body P and a frame M attached to the child body B (see the Joint class's documentation), this joint allows frame M to translate within the x-y plane of frame F and to rotate about the z-axis, with M's z-axis Mz and F's z-axis Fz coincident at all times. The translations along the x- and y-axes of F, the rotation about the z-axis and their rates specify the state of the joint. Zero (x, y, θ) corresponds to frames F and M being coincident and aligned. Translation (x, y) is defined to be positive in the direction of the respective axes and the rotation θ is defined to be positive according to the right-hand-rule with the thumb aligned in the direction of frame F's z-axis.
- Template Parameters
-
|
| PlanarJoint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, Vector3< double > damping) |
| Constructor to create a planar joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B translate and rotate as described in the class's documentation. More...
|
|
| ~PlanarJoint () final |
|
const std::string & | type_name () const final |
| Returns a string identifying the type of this joint, such as "revolute" or "prismatic". More...
|
|
Vector3< double > | default_damping () const |
| Returns this joint's default damping constant in N⋅s/m for the translational degrees and N⋅m⋅s for the rotational degree. More...
|
|
Vector2< double > | get_default_translation () const |
| Gets the default position for this joint. More...
|
|
void | set_default_translation (const Vector2< double > &p_FoMo_F) |
| Sets the default position of this joint. More...
|
|
double | get_default_rotation () const |
| Gets the default angle for this joint. More...
|
|
void | set_default_rotation (double theta) |
| Sets the default angle of this joint. More...
|
|
void | set_default_pose (const Vector2< double > &p_FoMo_F, double theta) |
| Sets the default position and angle of this joint. More...
|
|
void | set_random_pose_distribution (const Vector2< symbolic::Expression > &p_FoMo_F, const symbolic::Expression &theta) |
| Sets the random distribution that the position and angle of this joint will be randomly sampled from. More...
|
|
|
| PlanarJoint (const PlanarJoint &)=delete |
|
PlanarJoint & | operator= (const PlanarJoint &)=delete |
|
| PlanarJoint (PlanarJoint &&)=delete |
|
PlanarJoint & | operator= (PlanarJoint &&)=delete |
|
|
Vector2< T > | get_translation (const Context< T > &context) const |
| Gets the position of this joint from context . More...
|
|
const PlanarJoint< T > & | set_translation (Context< T > *context, const Vector2< T > &p_FoMo_F) const |
| Sets the context so that the position of this joint equals p_FoMo_F . More...
|
|
const T & | get_rotation (const systems::Context< T > &context) const |
| Gets the angle θ of this joint from context . More...
|
|
const PlanarJoint< T > & | set_rotation (systems::Context< T > *context, const T &theta) const |
| Sets the context so that the angle θ of this joint equals theta . More...
|
|
const PlanarJoint< T > & | set_pose (systems::Context< T > *context, const Vector2< T > &p_FoMo_F, const T &theta) const |
| Sets the context so that the position of this joint equals p_FoMo_F and its angle equals theta . More...
|
|
Vector2< T > | get_translational_velocity (const systems::Context< T > &context) const |
| Gets the translational velocity v_FoMo_F, in meters per second, of this joint's Mo measured and expressed in frame F from context . More...
|
|
const PlanarJoint< T > & | set_translational_velocity (systems::Context< T > *context, const Vector2< T > &v_FoMo_F) const |
| Sets the translational velocity, in meters per second, of this this joint's Mo measured and expressed in frame F to v_FoMo_F . More...
|
|
const T & | get_angular_velocity (const systems::Context< T > &context) const |
| Gets the rate of change, in radians per second, of this joint's angle θ from context . More...
|
|
const PlanarJoint< T > & | set_angular_velocity (systems::Context< T > *context, const T &theta_dot) const |
| Sets the rate of change, in radians per second, of this joint's angle θ (see class documentation) to theta_dot . More...
|
|
Public Member Functions inherited from Joint< T > |
| Joint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, VectorX< double > damping, const VectorX< double > &pos_lower_limits, const VectorX< double > &pos_upper_limits, const VectorX< double > &vel_lower_limits, const VectorX< double > &vel_upper_limits, const VectorX< double > &acc_lower_limits, const VectorX< double > &acc_upper_limits) |
| Creates a joint between two Frame objects which imposes a given kinematic relation between frame F attached on the parent body P and frame M attached on the child body B. More...
|
|
| Joint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, const VectorX< double > &pos_lower_limits, const VectorX< double > &pos_upper_limits, const VectorX< double > &vel_lower_limits, const VectorX< double > &vel_upper_limits, const VectorX< double > &acc_lower_limits, const VectorX< double > &acc_upper_limits) |
| Additional constructor overload for joints with zero damping. More...
|
|
virtual | ~Joint () |
|
JointIndex | index () const |
| Returns this element's unique index. More...
|
|
int | ordinal () const |
| Returns this element's unique ordinal. More...
|
|
const std::string & | name () const |
| Returns the name of this joint. More...
|
|
const RigidBody< T > & | parent_body () const |
| Returns a const reference to the parent body P. More...
|
|
const RigidBody< T > & | child_body () const |
| Returns a const reference to the child body B. More...
|
|
const Frame< T > & | frame_on_parent () const |
| Returns a const reference to the frame F attached on the parent body P. More...
|
|
const Frame< T > & | frame_on_child () const |
| Returns a const reference to the frame M attached on the child body B. More...
|
|
int | velocity_start () const |
| Returns the index to the first generalized velocity for this joint within the vector v of generalized velocities for the full multibody system. More...
|
|
int | num_velocities () const |
| Returns the number of generalized velocities describing this joint. More...
|
|
int | position_start () const |
| Returns the index to the first generalized position for this joint within the vector q of generalized positions for the full multibody system. More...
|
|
int | num_positions () const |
| Returns the number of generalized positions describing this joint. More...
|
|
bool | can_rotate () const |
| Returns true if this joint's mobility allows relative rotation of the two frames associated with this joint. More...
|
|
bool | can_translate () const |
| Returns true if this joint's mobility allows relative translation of the two frames associated with this joint. More...
|
|
std::string | position_suffix (int position_index_in_joint) const |
| Returns a string suffix (e.g. More...
|
|
std::string | velocity_suffix (int velocity_index_in_joint) const |
| Returns a string suffix (e.g. More...
|
|
const T & | GetOnePosition (const systems::Context< T > &context) const |
| Returns the position coordinate for joints with a single degree of freedom. More...
|
|
const T & | GetOneVelocity (const systems::Context< T > &context) const |
| Returns the velocity coordinate for joints with a single degree of freedom. More...
|
|
void | AddInOneForce (const systems::Context< T > &context, int joint_dof, const T &joint_tau, MultibodyForces< T > *forces) const |
| Adds into forces a force along the one of the joint's degrees of freedom indicated by index joint_dof . More...
|
|
void | AddInDamping (const systems::Context< T > &context, MultibodyForces< T > *forces) const |
| Adds into forces the force due to damping within this joint. More...
|
|
void | Lock (systems::Context< T > *context) const |
| Lock the joint. More...
|
|
void | Unlock (systems::Context< T > *context) const |
| Unlock the joint. More...
|
|
bool | is_locked (const systems::Context< T > &context) const |
|
const VectorX< double > & | default_damping_vector () const |
| Returns all default damping coefficients for joints that model viscous damping, of size num_velocities(). More...
|
|
const VectorX< T > & | GetDampingVector (const systems::Context< T > &context) const |
| Returns the Context dependent damping coefficients stored as parameters in context . More...
|
|
void | set_default_damping_vector (const VectorX< double > &damping) |
| Sets the default value of the viscous damping coefficients for this joint. More...
|
|
void | SetDampingVector (systems::Context< T > *context, const VectorX< T > &damping) const |
| Sets the value of the viscous damping coefficients for this joint, stored as parameters in context . More...
|
|
| Joint (const Joint &)=delete |
|
Joint & | operator= (const Joint &)=delete |
|
| Joint (Joint &&)=delete |
|
Joint & | operator= (Joint &&)=delete |
|
const VectorX< double > & | position_lower_limits () const |
| Returns the position lower limits. More...
|
|
const VectorX< double > & | position_upper_limits () const |
| Returns the position upper limits. More...
|
|
const VectorX< double > & | velocity_lower_limits () const |
| Returns the velocity lower limits. More...
|
|
const VectorX< double > & | velocity_upper_limits () const |
| Returns the velocity upper limits. More...
|
|
const VectorX< double > & | acceleration_lower_limits () const |
| Returns the acceleration lower limits. More...
|
|
const VectorX< double > & | acceleration_upper_limits () const |
| Returns the acceleration upper limits. More...
|
|
void | set_position_limits (const VectorX< double > &lower_limits, const VectorX< double > &upper_limits) |
| Sets the position limits to lower_limits and upper_limits . More...
|
|
void | set_velocity_limits (const VectorX< double > &lower_limits, const VectorX< double > &upper_limits) |
| Sets the velocity limits to lower_limits and upper_limits . More...
|
|
void | set_acceleration_limits (const VectorX< double > &lower_limits, const VectorX< double > &upper_limits) |
| Sets the acceleration limits to lower_limits and upper_limits . More...
|
|
void | set_default_positions (const VectorX< double > &default_positions) |
| Sets the default generalized position coordinates q₀ to default_positions . More...
|
|
const VectorX< double > & | default_positions () const |
| Returns the default generalized position coordinates q₀. More...
|
|
void | SetPositions (systems::Context< T > *context, const Eigen::Ref< const VectorX< T >> &positions) const |
| Sets in the given context the generalized position coordinates q for this joint to positions . More...
|
|
Eigen::Ref< const VectorX< T > > | GetPositions (const systems::Context< T > &context) const |
| Returns the current value in the given context of the generalized coordinates q for this joint. More...
|
|
void | SetVelocities (systems::Context< T > *context, const Eigen::Ref< const VectorX< T >> &velocities) const |
| Sets in the given context the generalized velocity coordinates v for this joint to velocities . More...
|
|
Eigen::Ref< const VectorX< T > > | GetVelocities (const systems::Context< T > &context) const |
| Returns the current value in the given context of the generalized velocities v for this joint. More...
|
|
void | SetDefaultPose (const math::RigidTransform< double > &X_FM) |
| Sets this joint's default generalized positions q₀ such that the pose of the child frame M in the parent frame F best matches the given pose. More...
|
|
math::RigidTransform< double > | GetDefaultPose () const |
| Returns this joint's default pose as a RigidTransform X_FM. More...
|
|
void | SetPose (systems::Context< T > *context, const math::RigidTransform< T > &X_FM) const |
| Sets in the given context this joint's generalized positions q such that the pose of the child frame M in the parent frame F best matches the given pose. More...
|
|
math::RigidTransform< T > | GetPose (const systems::Context< T > &context) const |
| Returns this joint's current pose using its position coordinates q taken from the given context and converting that to a RigidTransform X_FM(q). More...
|
|
void | SetSpatialVelocity (systems::Context< T > *context, const SpatialVelocity< T > &V_FM) const |
| Sets in the given context this joint's generalized velocities v such that the spatial velocity of the child frame M in the parent frame F best matches the given spatial velocity. More...
|
|
SpatialVelocity< T > | GetSpatialVelocity (const systems::Context< T > &context) const |
| Given the generalized positions q and generalized velocities v for this joint in the given context , returns the cross-joint spatial velocity V_FM. More...
|
|
void | SetDefaultPosePair (const Quaternion< double > &q_FM, const Vector3< double > &p_FM) |
| (Advanced) This is the same as SetDefaultPose() except it takes the pose as a (quaternion, translation vector) pair. More...
|
|
std::pair< Eigen::Quaternion< double >, Vector3< double > > | GetDefaultPosePair () const |
| (Advanced) This is the same as GetDefaultPose() except it returns this joint's default pose as a (quaternion, translation vector) pair. More...
|
|
void | SetPosePair (systems::Context< T > *context, const Quaternion< T > &q_FM, const Vector3< T > &p_FM) const |
| (Advanced) This is the same as SetPose() except it takes the pose as a (quaternion, translation vector) pair. More...
|
|
std::pair< Eigen::Quaternion< T >, Vector3< T > > | GetPosePair (const systems::Context< T > &context) const |
| (Advanced) This is the same as GetPose() except it returns this joint's pose in the given context as a (quaternion, translation vector) pair. More...
|
|
Public Member Functions inherited from MultibodyElement< T > |
virtual | ~MultibodyElement () |
|
ModelInstanceIndex | model_instance () const |
| Returns the ModelInstanceIndex of the model instance to which this element belongs. More...
|
|
template<typename MultibodyPlantDeferred = MultibodyPlant<T>> |
const MultibodyPlantDeferred & | GetParentPlant () const |
| Returns the MultibodyPlant that owns this MultibodyElement. More...
|
|
void | DeclareParameters (internal::MultibodyTreeSystem< T > *tree_system) |
| Declares MultibodyTreeSystem Parameters at MultibodyTreeSystem::Finalize() time. More...
|
|
void | SetDefaultParameters (systems::Parameters< T > *parameters) const |
| Sets default values of parameters belonging to each MultibodyElement in parameters at a call to MultibodyTreeSystem::SetDefaultParameters(). More...
|
|
| MultibodyElement (const MultibodyElement &)=delete |
|
MultibodyElement & | operator= (const MultibodyElement &)=delete |
|
| MultibodyElement (MultibodyElement &&)=delete |
|
MultibodyElement & | operator= (MultibodyElement &&)=delete |
|