Skip to content

Commit

Permalink
Update jaxsim_walking.ipynb
Browse files Browse the repository at this point in the history
Co-authored-by: Filippo Ferretti <[email protected]>
  • Loading branch information
xela-95 and flferretti committed Oct 14, 2024
1 parent c028e2e commit fcea6d9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion examples/jaxsim_walking.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@
"]\n",
"\n",
"urdf_robot_string = create_urdf_instance.write_urdf_to_file()\n",
"robot_model_init = RobotModel(urdf_robot_string, \"stickBot\", joint_names)"
"robot_model_init = RobotModel(urdf_robot_string, \"stickBot\", joint_names)\n",
"robot_model_init.set_foot_corner(\n",
" np.asarray([0.1, 0.05, 0.0]),\n",
" np.asarray([0.1, -0.05, 0.0]),\n",
" np.asarray([-0.1, -0.05, 0.0]),\n",
" np.asarray([-0.1, 0.05, 0.0]),\n",
")"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion src/comodo/jaxsimSimulator/jaxsimSimulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,8 @@ def base_velocity(self) -> npt.ArrayLike:
assert (
self._is_initialized
), "Simulator is not initialized, call load_model first."
return np.array(self._data.base_velocity())
with self._data.switch_velocity_representation(VelRepr.Mixed):
return np.array(self._data.base_velocity())

@property
def simulation_time(self) -> float:
Expand Down

0 comments on commit fcea6d9

Please sign in to comment.