Drake
Drake C++ Documentation
CurvilinearJoint< T > Class Template Referencefinal

Detailed Description

template<typename T>
class drake::multibody::CurvilinearJoint< T >

A Joint that allows a body to move along a piecewise constant curvature path contained in a plane.

The path is specified as a PiecewiseConstantCurvatureTrajectory, refer to that class documentation for further details on parameterization, conventions and notation used.

This joint grants a single degree of freedom q that corresponds to the length s (in meters) along the path. The generalized velocity v = q̇ corresponds to the magnitude of the tangential velocity. We denote with F a frame on a "parent" body and with M a frame on a "child" body. For a given trajectory, this joint prescribes X_FM(q) = PiecewiseConstantCurvatureTrajectory::CalcPose(q).

Frame M is defined according to the convention documented in PiecewiseConstantCurvatureTrajectory. That is, axis Mx is the tangent to the trajectory, Mz equals the (constant) normal p̂ to the plane, and My = Mz x Mx. It is not required that M coincides with F at distance q = 0.

If the specified trajectory is periodic, the joint prescribes a trajectory of cycle length L that satisfies X_FP(s) = X_FP(s + k⋅L) ∀ k ∈ ℤ.

By default, the joint position limits are the endpoints for aperiodic paths, and (-∞, ∞) for periodic paths.

Template Parameters
TThe scalar type, which must be one of the default scalars.

#include <drake/multibody/tree/curvilinear_joint.h>

Public Types

template<typename Scalar >
using Context = systems::Context< Scalar >
 

Public Member Functions

 CurvilinearJoint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, const trajectories::PiecewiseConstantCurvatureTrajectory< double > &curvilinear_path, double damping=0)
 Constructor to create a curvilinear joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, move relatively to one another along a planar curvilinear path. More...
 
 CurvilinearJoint (const std::string &name, const Frame< T > &frame_on_parent, const Frame< T > &frame_on_child, const trajectories::PiecewiseConstantCurvatureTrajectory< double > curvilinear_path, double pos_lower_limit, double pos_upper_limit, double damping=0)
 Constructor to create a curvilinear joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, move relatively to one another along a planar curvilinear path. More...
 
 ~CurvilinearJoint () override
 
const std::string & type_name () const override
 Returns a string identifying the type of this joint, such as "revolute" or "prismatic". More...
 
double default_damping () const
 Returns this joint's default damping constant in N⋅s/m. More...
 
void set_default_damping (double damping)
 Sets the default value of viscous damping for this joint, in N⋅s/m. More...
 
double position_lower_limit () const
 Returns the position lower limit for this joint in m. More...
 
double position_upper_limit () const
 Returns the position upper limit for this joint in m. More...
 
double velocity_lower_limit () const
 Returns the velocity lower limit for this joint in m/s. More...
 
double velocity_upper_limit () const
 Returns the velocity upper limit for this joint in m/s. More...
 
double acceleration_lower_limit () const
 Returns the acceleration lower limit for this joint in m/s². More...
 
double acceleration_upper_limit () const
 Returns the acceleration upper limit for this joint in m/s². More...
 
const T & get_distance (const systems::Context< T > &context) const
 Gets the travel distance of the joint from the provided context. More...
 
const CurvilinearJoint< T > & set_distance (systems::Context< T > *context, const T &distance) const
 Sets the travel distance of the joint from the provided context. More...
 
void set_random_distance_distribution (const symbolic::Expression &distance)
 Sets the random distribution for the distance along the path. More...
 
const T & get_tangential_velocity (const systems::Context< T > &context) const
 Gets the tangential velocity in meters per second, i.e. More...
 
const CurvilinearJoint< T > & set_tangential_velocity (systems::Context< T > *context, const T &tangential_velocity) const
 Sets the tangential velocity of the joint from the provided context. More...
 
const T & GetDamping (const systems::Context< T > &context) const
 Returns the Context dependent damping coefficient stored as a parameter in context. More...
 
void SetDamping (systems::Context< T > *context, const T &damping) const
 Sets the value of the viscous damping coefficient for this joint, stored as a parameter in context. More...
 
double get_default_distance () const
 Gets the default travel distance along the path. More...
 
void set_default_distance (double distance)
 Sets the default travel distance of this joint. More...
 
void AddInForce (const systems::Context< T > &context, const T &force, MultibodyForces< T > *forces) const
 Adds into a MultibodyForces a generalized force on this joint. More...
 
Does not allow copy, move, or assignment
 CurvilinearJoint (const CurvilinearJoint &)=delete
 
CurvilinearJointoperator= (const CurvilinearJoint &)=delete
 
 CurvilinearJoint (CurvilinearJoint &&)=delete
 
CurvilinearJointoperator= (CurvilinearJoint &&)=delete
 
- 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
 
Jointoperator= (const Joint &)=delete
 
 Joint (Joint &&)=delete
 
Jointoperator= (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< doubleGetDefaultPose () 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 = void>
const MultibodyPlant< T > & 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
 
MultibodyElementoperator= (const MultibodyElement &)=delete
 
 MultibodyElement (MultibodyElement &&)=delete
 
MultibodyElementoperator= (MultibodyElement &&)=delete
 

Static Public Attributes

static const char kTypeName [] = "curvilinear"
 

Protected Member Functions

void DoAddInOneForce (const systems::Context< T > &, int joint_dof, const T &joint_tau, MultibodyForces< T > *forces) const override
 Joint<T> override called through public NVI, Joint::AddInForce(). More...
 
void DoAddInDamping (const systems::Context< T > &context, MultibodyForces< T > *forces) const override
 Joint<T> override called through public NVI, Joint::AddInDamping(). More...
 
- Protected Member Functions inherited from Joint< T >
virtual void DoSetDefaultPosePair (const Quaternion< double > &q_FM, const Vector3< double > &p_FM)
 Implementation of the NVI SetDefaultPose(). More...
 
virtual std::pair< Eigen::Quaternion< double >, Vector3< double > > DoGetDefaultPosePair () const
 Implementation of the NVI GetDefaultPose(). More...
 
void DoSetTopology (const internal::MultibodyTreeTopology &) override
 Implementation of the NVI SetTopology(). More...
 
const JointImplementationget_implementation () const
 Returns a const reference to the internal implementation of this joint. More...
 
bool has_implementation () const
 Returns whether this joint owns a particular implementation. More...
 
std::pair< const Frame< T > *, const Frame< T > * > tree_frames (bool use_reversed_mobilizer) const
 Utility for concrete joint implementations to use to select the inboard/outboard frames for a tree in the spanning forest, given whether they should be reversed from the parent/child frames that are members of this Joint object. More...
 
template<template< typename > class ConcreteMobilizer>
const ConcreteMobilizer< T > & get_mobilizer_downcast () const
 (Internal use only) Returns the mobilizer implementing this joint, downcast to its specific type. More...
 
template<template< typename > class ConcreteMobilizer>
ConcreteMobilizer< T > & get_mutable_mobilizer_downcast ()
 (Internal use only) Mutable flavor of get_mobilizer_downcast(). More...
 
- Protected Member Functions inherited from MultibodyElement< T >
 MultibodyElement ()
 Default constructor made protected so that sub-classes can still declare their default constructors if they need to. More...
 
 MultibodyElement (ModelInstanceIndex model_instance)
 Constructor which allows specifying a model instance. More...
 
 MultibodyElement (ModelInstanceIndex model_instance, int64_t index)
 Both the model instance and element index are specified. More...
 
template<typename ElementIndexType >
ElementIndexType index_impl () const
 Returns this element's unique index. More...
 
int ordinal_impl () const
 Returns this element's unique ordinal. More...
 
const internal::MultibodyTree< T > & get_parent_tree () const
 Returns a constant reference to the parent MultibodyTree that owns this element. More...
 
const internal::MultibodyTreeSystem< T > & GetParentTreeSystem () const
 Returns a constant reference to the parent MultibodyTreeSystem that owns the parent MultibodyTree that owns this element. More...
 
void SetTopology (const internal::MultibodyTreeTopology &tree)
 Gives MultibodyElement-derived objects the opportunity to retrieve their topology after MultibodyTree::Finalize() is invoked. More...
 
systems::NumericParameterIndex DeclareNumericParameter (internal::MultibodyTreeSystem< T > *tree_system, const systems::BasicVector< T > &model_vector)
 To be used by MultibodyElement-derived objects when declaring parameters in their implementation of DoDeclareParameters(). More...
 
systems::AbstractParameterIndex DeclareAbstractParameter (internal::MultibodyTreeSystem< T > *tree_system, const AbstractValue &model_value)
 To be used by MultibodyElement-derived objects when declaring parameters in their implementation of DoDeclareParameters(). More...
 

Friends

template<typename >
class CurvilinearJoint
 

Member Typedef Documentation

◆ Context

using Context = systems::Context<Scalar>

Constructor & Destructor Documentation

◆ CurvilinearJoint() [1/4]

CurvilinearJoint ( const CurvilinearJoint< T > &  )
delete

◆ CurvilinearJoint() [2/4]

CurvilinearJoint ( CurvilinearJoint< T > &&  )
delete

◆ CurvilinearJoint() [3/4]

CurvilinearJoint ( const std::string &  name,
const Frame< T > &  frame_on_parent,
const Frame< T > &  frame_on_child,
const trajectories::PiecewiseConstantCurvatureTrajectory< double > &  curvilinear_path,
double  damping = 0 
)

Constructor to create a curvilinear joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, move relatively to one another along a planar curvilinear path.

See this class's documentation for further details on the definition of these frames and the curvilinear path.

This constructor signature creates a joint where the joint velocity and acceleration limits are (-∞, ∞). Position limits are (0, L) with L the length of the trajectory. If the trajectory is periodic, position limits are (-∞, ∞).

The first three arguments to this constructor are those of the Joint class constructor. See the Joint class's documentation for details. The additional parameters are:

Parameters
[in]curvilinear_pathThe curvilinear path for this joint, along which the child frame M moves relative to the parent frame F.
[in]dampingViscous damping coefficient, in N⋅s/m, used to model losses within the joint. The damping force (in N) is modeled as f = -damping⋅v along the tangent to the curve, i.e. opposing motion, with v the tangential velocity for this joint (see get_tangential_velocity()).
Exceptions
std::exceptionif damping is negative

◆ CurvilinearJoint() [4/4]

CurvilinearJoint ( const std::string &  name,
const Frame< T > &  frame_on_parent,
const Frame< T > &  frame_on_child,
const trajectories::PiecewiseConstantCurvatureTrajectory< double curvilinear_path,
double  pos_lower_limit,
double  pos_upper_limit,
double  damping = 0 
)

Constructor to create a curvilinear joint between two bodies so that frame F attached to the parent body P and frame M attached to the child body B, move relatively to one another along a planar curvilinear path.

See this class's documentation for further details on the definition of these frames and the path.

The first three arguments to this constructor are those of the Joint class constructor. See the Joint class's documentation for details. The additional parameters are:

Parameters
[in]curvilinear_pathThe curvilinear path for this joint, along which the child frame M moves relative to the parent frame F.
[in]pos_lower_limitLower position limit, in meters, for the distance coordinate (see get_distance()).
[in]pos_upper_limitUpper position limit, in meters, for the distance coordinate (see get_distance()).
[in]dampingViscous damping coefficient, in N⋅s/m, used to model losses within the joint. The damping force (in N) is modeled as f = -damping⋅v along the tangent to the curve, i.e. opposing motion, with v the tangential velocity for this joint (see get_tangential_velocity()).
Exceptions
std::exceptionif damping is negative.
std::exceptionif pos_lower_limit > pos_upper_limit.

◆ ~CurvilinearJoint()

~CurvilinearJoint ( )
override

Member Function Documentation

◆ acceleration_lower_limit()

double acceleration_lower_limit ( ) const

Returns the acceleration lower limit for this joint in m/s².

◆ acceleration_upper_limit()

double acceleration_upper_limit ( ) const

Returns the acceleration upper limit for this joint in m/s².

◆ AddInForce()

void AddInForce ( const systems::Context< T > &  context,
const T &  force,
MultibodyForces< T > *  forces 
) const

Adds into a MultibodyForces a generalized force on this joint.

A generalized force for a curvilinear joint is equivalent to a force in Newtons applied along the path tangent direction (x-axis of frame M).

Parameters
[in]contextThe context of the model this joint belongs to.
[in]forceThe force to be applied, in Newtons.
[out]forcesThe MultibodyForces object to which the generalized force is added.

◆ default_damping()

double default_damping ( ) const

Returns this joint's default damping constant in N⋅s/m.

◆ DoAddInDamping()

void DoAddInDamping ( const systems::Context< T > &  context,
MultibodyForces< T > *  forces 
) const
overrideprotectedvirtual

Joint<T> override called through public NVI, Joint::AddInDamping().

Arguments already checked to be valid by Joint::AddInDamping().

Adds a dissipative force according to the viscous law f = -d⋅v, where d is the damping coefficient (see default_damping()) and v the tangential velocity along the path.

Parameters
[in]contextThe context of the model this joint belongs to.
[out]forcesThe MultibodyForces object to which the damping force is added.

Reimplemented from Joint< T >.

◆ DoAddInOneForce()

void DoAddInOneForce ( const systems::Context< T > &  ,
int  joint_dof,
const T &  joint_tau,
MultibodyForces< T > *  forces 
) const
overrideprotectedvirtual

Joint<T> override called through public NVI, Joint::AddInForce().

Arguments already checked to be valid by Joint::AddInForce().

Parameters
[in]joint_dofThe joint degree of freedom index, on which the force is added, which must be 0.
[in]joint_tauThe force along the path's tangential axis to be added, in Newtons, applied to the child body.
[out]forcesThe MultibodyForces object to which the force is added.
See also
The public NVI AddInOneForce() for details.

Implements Joint< T >.

◆ get_default_distance()

double get_default_distance ( ) const

Gets the default travel distance along the path.

◆ get_distance()

const T& get_distance ( const systems::Context< T > &  context) const

Gets the travel distance of the joint from the provided context.

Parameters
[in]contextThe context of the model this joint belongs to.
Returns
The distance coordinate of the joint stored in the context.

◆ get_tangential_velocity()

const T& get_tangential_velocity ( const systems::Context< T > &  context) const

Gets the tangential velocity in meters per second, i.e.

the rate of change of this joint's travel distance (see get_distance()) from the provided context.

Parameters
[in]contextThe context of the model this joint belongs to.
Returns
The tangential velocity as stored in the provided context.

◆ GetDamping()

const T& GetDamping ( const systems::Context< T > &  context) const

Returns the Context dependent damping coefficient stored as a parameter in context.

Refer to default_damping() for details.

Parameters
[in]contextThe context of the model this joint belongs to.
Returns
The damping coefficient stored in the context, in N⋅s/m.

◆ operator=() [1/2]

CurvilinearJoint& operator= ( CurvilinearJoint< T > &&  )
delete

◆ operator=() [2/2]

CurvilinearJoint& operator= ( const CurvilinearJoint< T > &  )
delete

◆ position_lower_limit()

double position_lower_limit ( ) const

Returns the position lower limit for this joint in m.

◆ position_upper_limit()

double position_upper_limit ( ) const

Returns the position upper limit for this joint in m.

◆ set_default_damping()

void set_default_damping ( double  damping)

Sets the default value of viscous damping for this joint, in N⋅s/m.

Exceptions
std::exceptionif damping is negative.
Precondition
the MultibodyPlant must not be finalized.

◆ set_default_distance()

void set_default_distance ( double  distance)

Sets the default travel distance of this joint.

Parameters
[in]distanceThe desired default distance of the joint in meters.

◆ set_distance()

const CurvilinearJoint<T>& set_distance ( systems::Context< T > *  context,
const T &  distance 
) const

Sets the travel distance of the joint from the provided context.

Parameters
[in]contextThe context of the model this joint belongs to.
[in]distanceThe travel distance to be set in the context.
Returns
const reference to this joint.

◆ set_random_distance_distribution()

void set_random_distance_distribution ( const symbolic::Expression distance)

Sets the random distribution for the distance along the path.

Parameters
[in]distanceExpression defining the random distance distribution.

◆ set_tangential_velocity()

const CurvilinearJoint<T>& set_tangential_velocity ( systems::Context< T > *  context,
const T &  tangential_velocity 
) const

Sets the tangential velocity of the joint from the provided context.

Parameters
[in]contextThe context of the model this joint belongs to.
[in]tangential_velocityThe tangential velocity to be set in the context.
Returns
const reference to this joint.

◆ SetDamping()

void SetDamping ( systems::Context< T > *  context,
const T &  damping 
) const

Sets the value of the viscous damping coefficient for this joint, stored as a parameter in context.

Refer to default_damping() for details.

Parameters
[out]contextThe context of the model this joint belongs to.
[in]dampingThe damping coefficient to be set in N⋅s/m.
Exceptions
std::exceptionif damping is negative.

◆ type_name()

const std::string& type_name ( ) const
overridevirtual

Returns a string identifying the type of this joint, such as "revolute" or "prismatic".

Implements Joint< T >.

◆ velocity_lower_limit()

double velocity_lower_limit ( ) const

Returns the velocity lower limit for this joint in m/s.

◆ velocity_upper_limit()

double velocity_upper_limit ( ) const

Returns the velocity upper limit for this joint in m/s.

Friends And Related Function Documentation

◆ CurvilinearJoint

friend class CurvilinearJoint
friend

Member Data Documentation

◆ kTypeName

const char kTypeName = "curvilinear"
static

The documentation for this class was generated from the following file: