@@ -22,36 +22,42 @@ namespace drake {
22
22
namespace multibody {
23
23
namespace internal {
24
24
25
- /* * A Mobilizer that describes the motion of the mobilized frame M along a
25
+ /* A Mobilizer that describes the motion of the mobilized frame M along a
26
26
piecewise constant curvature path contained in a plane.
27
27
28
28
The path is specified as a PiecewiseConstantCurvatureTrajectory, refer to that
29
29
class documentation for further details on parameterization, conventions and
30
30
notation used.
31
31
32
32
This mobilizer grants a single degree of freedom q that corresponds to the
33
- length s (in meters) along the path. The generalized velocity v = q̇
34
- corresponds to the magnitude of the tangential velocity. The mobilized frame M
35
- is defined according to the convention documented in
33
+ length s (in meters) along the path. The generalized velocity v = q̇ (= ṡ)
34
+ corresponds to the signed magnitude of the tangential velocity. The mobilized
35
+ frame M is defined according to the convention documented in
36
36
PiecewiseConstantCurvatureTrajectory. That is, axis Mx is the tangent to the
37
- trajectory, Mz equals the (constant) normal p̂ to the plane, and My = Mz x Mx.
37
+ trajectory, Mz equals the (constant) normal p̂ to the plane, and My = Mz⨯ Mx.
38
38
It is not required that M coincides with F at distance q = 0.
39
39
40
- If the specified trajectory is periodic, the mobilizer describes a trajectory
41
- of length s_f that satisfies X_FM(q) = X_FM(q + s_f).
42
-
43
40
At any given point along the path, the turning rate ρ(q) (units of 1/m) is
44
- defined such the angular velocity is given by w_FM = ρ⋅v⋅Mz_F, i.e. |ρ(q)|
41
+ defined such the angular velocity is given by ω_FM = ρ⋅v⋅Mz_F, i.e. |ρ(q)|
45
42
corresponds to the path's curvature and its sign is defined via the right-hand
46
43
rule about the plane's normal Mz.
47
44
45
+ If the specified trajectory is periodic, the mobilizer describes a trajectory
46
+ of length s_f that satisfies X_FM(q) = X_FM(q + s_f) and ρ(q) = ρ(q + s_f).
47
+
48
48
Therefore the hinge matrix H_FM ∈ ℝ⁶ˣ¹ and its time derivative are
49
49
50
- H_FM(q) = [ρ(q)⋅Mz_F(q)] Hdot_FM(q) = [ 0 ]
51
- [ Mx_F(q)], [ρ(q)⋅v⋅My_F(q)].
50
+ H_FM_F(q) = [ρ(q)⋅Mz_F(q)] Hdot_FM_F(q,v) = [ 0 ]
51
+ [ Mx_F(q)], [ρ(q)⋅v⋅My_F(q)]
52
+
53
+ (Recall that the time derivative taken in F of a vector r⃗ fixed in a frame
54
+ M is given by ω_FM ⨯ r⃗, so DtF(Mx) = (ρ⋅v⋅Mz) ⨯ Mx = ρ⋅v⋅My.)
55
+
56
+ This is of course much nicer in M:
57
+ H_FM_M(q) = [0 0 ρ(q) 1 0 0]ᵀ Hdot_FM_M = [ 0₆ ]ᵀ
52
58
53
- where the angular component of Hdot_FM is zero since ρ(q) is constant within
54
- each piecewise segment in PiecewiseConstantCurvatureTrajectory.
59
+ The angular component of Hdot_FM is zero since ρ(q) is constant within each
60
+ piecewise segment in PiecewiseConstantCurvatureTrajectory.
55
61
56
62
@tparam_default_scalar */
57
63
template <typename T>
@@ -67,7 +73,7 @@ class CurvilinearMobilizer final : public MobilizerImpl<T, 1, 1> {
67
73
template <typename U>
68
74
using HMatrix = typename MobilizerBase::template HMatrix<U>;
69
75
70
- /* * Constructor for a CurvilinearMobilizer describing the motion of outboard
76
+ /* Constructor for a CurvilinearMobilizer describing the motion of outboard
71
77
frame M along `curvilinear_path` with pose X_FM in the inboard frame F. Refer
72
78
to the class documentation for further details on notation and conventions.
73
79
@@ -96,49 +102,49 @@ class CurvilinearMobilizer final : public MobilizerImpl<T, 1, 1> {
96
102
bool can_rotate () const final { return true ; }
97
103
bool can_translate () const final { return true ; }
98
104
99
- /* * Gets the distance of travel along the path of the mobilizer from
105
+ /* Gets the distance of travel along the path of the mobilizer from
100
106
the provided context in meters.
101
107
@param context The context of the model this mobilizer belongs to.
102
108
@returns The distance coordinate of the mobilizer in the context. */
103
109
const T& get_distance (const systems::Context<T>& context) const ;
104
110
105
- /* * Sets the distance of travel along the path of the mobilizer from
111
+ /* Sets the distance of travel along the path of the mobilizer from
106
112
the provided context in meters.
107
113
@param context The context of the model this mobilizer belongs to.
108
114
@param distance The desired distance coordinate of the mobilizer.
109
115
@returns a const reference to this mobilizer */
110
116
const CurvilinearMobilizer<T>& SetDistance (systems::Context<T>* context,
111
117
const T& distance) const ;
112
118
113
- /* * Gets the tangential velocity of the mobilizer from the provided context in
119
+ /* Gets the tangential velocity of the mobilizer from the provided context in
114
120
meters per second.
115
121
@param context The context of the model this mobilizer belongs to.
116
122
@returns The velocity coordinate of the mobilizer in the context. */
117
123
const T& get_tangential_velocity (const systems::Context<T>& context) const ;
118
124
119
- /* * Sets the tangential velocity of the mobilizer from the provided context in
125
+ /* Sets the tangential velocity of the mobilizer from the provided context in
120
126
meters per second.
121
127
@param context The context of the model this mobilizer belongs to.
122
128
@param tangential_velocity The desired velocity coordinate of the mobilizer.
123
129
@returns a const reference to this mobilizer */
124
130
const CurvilinearMobilizer<T>& SetTangentialVelocity (
125
131
systems::Context<T>* context, const T& tangential_velocity) const ;
126
132
127
- /* * Computes the across-mobilizer transform X_FM(q) as a function of the
133
+ /* Computes the across-mobilizer transform X_FM(q) as a function of the
128
134
distance traveled along the mobilizer's path.
129
135
@param q The distance traveled along the mobilizer's path in meters.
130
136
@returns The across-mobilizer transform X_FM(q). */
131
137
math::RigidTransform<T> calc_X_FM (const T* q) const ;
132
138
133
- /* * Computes the across-mobilizer spatial velocity V_FM(q, v) as a function of
139
+ /* Computes the across-mobilizer spatial velocity V_FM(q, v) as a function of
134
140
the distance traveled and tangential velocity along the mobilizer's path.
135
141
@param q The distance traveled along the mobilizer's path in meters.
136
142
@param v The tangential velocity along the mobilizer's path in meters per
137
143
second.
138
144
@returns The across-mobilizer spatial velocity V_FM(q, v). */
139
145
SpatialVelocity<T> calc_V_FM (const T* q, const T* v) const ;
140
146
141
- /* * Computes the across-mobilizer spatial acceleration A_FM(q, v, v̇) as a
147
+ /* Computes the across-mobilizer spatial acceleration A_FM(q, v, v̇) as a
142
148
function of the distance traveled, tangential velocity, and tangential
143
149
acceleration along the mobilizer's path.
144
150
@param q The distance traveled along the mobilizer's path in meters.
@@ -149,7 +155,7 @@ class CurvilinearMobilizer final : public MobilizerImpl<T, 1, 1> {
149
155
@returns The across-mobilizer spatial acceleration A_FM(q, v, v̇). */
150
156
SpatialAcceleration<T> calc_A_FM (const T* q, const T* v, const T* vdot) const ;
151
157
152
- /* * Projects the spatial force `F_Mo_F` on `this` mobilizer's outboard
158
+ /* Projects the spatial force `F_Mo_F` on `this` mobilizer's outboard
153
159
frame M onto the path tangent. Mathematically, tau = F_Mo_F⋅H_FMᵀ.
154
160
155
161
The result of this projection is the magnitude of a force (in N) along
0 commit comments