Add MuJoCo pick-and-place example with Franka Panda#201
Conversation
|
Very cool!
This is totally fine; they will also need to pip install mujoco as well. Since it's an example and not the core library, it's okay. However, it would be even better if we could instead have our own MJCF XML file in the repo pointing to the same meshes. There should be several options for automatic conversion, including in https://github.com/ros-controls/mujoco_ros2_control
That would be cool, but not required. Maybe more important would be to have more obstacles in the scene; for example a wall between the pick and place locations.
Viser would be able to show the RRT, which is nice, but it also would make the example code busy. How about no Viser, but we display the resulting path in the mujoco viewer? |
|
Added changes Untitled.design-2.mp4 |
|
So, it seems the block clips the obstacle. Do we need to include it as a collision geometry in this example and allow collisions between it and the fingers/table? Also the stop and go behavior in the RRT is expected with the default "Hermite" mode of the TOPPRA parameterizer. If you change this to "Adaptive" it should on average move much smoother! |
| hand_body_id = mujoco.mj_name2id(model, mujoco.mjtObj.mjOBJ_BODY, "hand") | ||
| cube_jnt_addr = model.jnt_qposadr[model.body_jntadr[cube_body_id]] | ||
|
|
||
| def draw_ee_path(traj, color: np.ndarray) -> None: |
There was a problem hiding this comment.
I wonder if we should.make a mujoco utils file in the examples to keep this in?
Ref - #190
Uses the Franka Panda model from MuJoCo Menagerie for physics simulation, and the FR3 URDF from roboplan's example models for motion planning (IK, RRT, TOPP-RA). I found out that the two models are kinematically near-identical so plans transfer directly.
Full sequence: SimpleIK for grasp/lift/place waypoints, RRT for collision-free joint-space motion, TOPP-RA for time parameterization, and manual cube tracking during carry.
Doubts -
Untitled.design.mp4