Skip to content

Add MuJoCo pick-and-place example with Franka Panda#201

Open
crisiumnih wants to merge 4 commits into
open-planning:mainfrom
crisiumnih:mujoco_example_190
Open

Add MuJoCo pick-and-place example with Franka Panda#201
crisiumnih wants to merge 4 commits into
open-planning:mainfrom
crisiumnih:mujoco_example_190

Conversation

@crisiumnih
Copy link
Copy Markdown
Contributor

@crisiumnih crisiumnih commented May 11, 2026

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 -

  • someone would have to clone MuJoCo Menagerie, to run the example, is this a valid option?
  • shall i add randomize cube spawn and place target within a safe reachable region to demonstrate planning.
  • Uses the MuJoCo passive viewer only, shall I add keep Viser as main or both?
Untitled.design.mp4

@sea-bass
Copy link
Copy Markdown
Collaborator

Very cool!

someone would have to clone MuJoCo Menagerie, to run the example, is this a valid option?

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

shall i add randomize cube spawn and place target within a safe reachable region to demonstrate planning.

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.

Uses the MuJoCo passive viewer only, shall I add keep Viser as main or both?

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?

@sea-bass sea-bass linked an issue May 11, 2026 that may be closed by this pull request
@crisiumnih
Copy link
Copy Markdown
Contributor Author

Added changes

Untitled.design-2.mp4

@sea-bass
Copy link
Copy Markdown
Collaborator

sea-bass commented May 18, 2026

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:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should.make a mujoco utils file in the examples to keep this in?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create simple pick and place sequence example with MuJoCo

2 participants