You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The corresponding world SDF is [`apply_joint_force.sdf`](https://github.com/gazebosim/gz-sim/blob/gz-sim8/examples/worlds/apply_joint_force.sdf), which you can look at in Gazebo:
14
+
The corresponding world SDF is [`apply_joint_force.sdf`](https://github.com/gazebosim/gz-sim/blob/gz-sim9/examples/worlds/apply_joint_force.sdf), which you can look at in Gazebo:
15
15
16
16
```bash
17
17
gz sim apply_joint_force.sdf
@@ -56,11 +56,13 @@ In this case, we use the joint entity found above to look for and modify its
56
56
`JointForceCmd` component.
57
57
This will apply a force command to the joint.
58
58
59
-
In `PreUpdate()`, look for the component:
59
+
In `PreUpdate()`, look for the component. If it does not exist yet, create it,
60
+
setting its default value to `{0.0}` (which means, in this particular case,
61
+
a 1-element `std::vector<double>` with value 0.0 in its only element):
0 commit comments