Repository navigation
Merge upstream/main (28 commits) into impedence-control-support - #10
Merged
Merged
Conversation
* Add a pre-step callback function * Update the plugin header and docs * Update base velocity plugin * Update external wrench --------- Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com>
A user close makes RenderLoop return but leaves the controller manager alive. Track explicit shutdown separately because MuJoCo sets exitrequest for both paths, and shut down only the owning ROS context after a UI close. Add focused regressions covering UI-close and explicit-shutdown origins. Generated-by: OpenAI Codex (GPT-5; accessed 2026-08-18) Signed-off-by: Dylan Gallagher <76841713+Dylan-Gallagher@users.noreply.github.com> Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com> Co-authored-by: Erik Holum <erik.holum@nasa.gov>
* Fix plugin parameter namespaces * Fix tests
TinyXML2 is already required directly and linked into the control library. Remove the obsolete vendor lookup and manifest dependency so Lyrical builds no longer emit the vendor deprecation warning. Generated-by: OpenAI Codex (GPT-5; accessed 2026-08-18) Signed-off-by: Dylan Gallagher <76841713+Dylan-Gallagher@users.noreply.github.com> Co-authored-by: Sai Kishor Kothakota <sai.kishor@pal-robotics.com> Co-authored-by: Erik Holum <erik.holum@nasa.gov>
…-controls#294) * Add world_reset plugin hook and restore eq_active on world reset Plugins can activate equality constraints at runtime (e.g. a vacuum gripper toggling a weld). Two gaps in the reset path made that state leak across ResetWorld: - reset_world_state() restored qpos/qvel/ctrl but never eq_active, so a runtime-activated constraint survived the reset. Restore eq_active from eq_active0 (the MJCF-authored defaults). - Plugins had no way to learn a reset happened: resets preserve simulation time for ROS clock continuity, so watching data->time backwards does not work. Add a world_reset(mjData*) virtual to MuJoCoROS2ControlPluginBase (default no-op, non-breaking) and dispatch it to all plugin instances after the state restore. * Add tests for eq_active restore and world_reset dispatch - ResetWorldRestoresEqualityConstraintActivation: a runtime-activated weld equality returns to its MJCF-authored (inactive) state on reset_world_state. - test_world_reset_dispatch: loads the out-of-package TestPlugin via the mujoco_plugins parameter namespace and verifies world_reset() is dispatched to it when the reset_world service resets the simulation. TestPlugin publishes its world_reset call count (latched) to make the hook observable. * Address review feedback - Rename the plugin hook world_reset() -> on_reset_world(), matching the on_<verb> callback convention and the existing reset_world service, ResetWorld type and reset_world_state()/reset_world_callback() naming. - Trim the class-level hook documentation; keep the "resets preserve simulation time" rationale on the method itself, where it is needed. - Correct the hook's threading note: it runs with the simulation mutex held from either the reset service callback or the physics loop, not on the ros2_control control thread. - Drop the verbose comment above the eq_active restore. - Fix the copyright holder on the new test file. * Rename the plugin hook to on_reset() A plugin's reaction is the same whatever was reset: drop state that refers to the pre-reset world. Naming the hook after one specific trigger couples the plugin interface to a core implementation detail, so use the generic name and let the documentation say when it fires. This also leaves room for a future partial reset to reuse the hook without an API change. * update plugin docs --------- Co-authored-by: Erik Holum <erik.holum@nasa.gov>
…E/OBJ) (ros-controls#264) Co-authored-by: Sebastian Castro <sebastian.a.castrofernandez@nasa.gov>
…ake_mjcf_from_robot_description.py to reuse the new logic (ros-controls#265) Co-authored-by: Sebastian Castro <sebastian.a.castrofernandez@nasa.gov>
…trols#267) Co-authored-by: Sebastian Castro <sebastian.a.castrofernandez@nasa.gov>
…decomposing (ros-controls#268) * Add tests to make sure the siblings reuse the decomposed meshes * Fix the tests * Add expand_sibling_collisions method for handling scales * fix pre-commit
* adding grav comp plugin * adding extra parameters and taking in multiple FTS * cleanup and adding site-id * fixing typo site ids * first working version * initial docs * adding testing infra * adding some more initial tests * adding more tests and a bit of cleanup * fix typo * fixing parameter name search depth issue in humble * adding to list of available plugins * Update mujoco_ros2_control_plugins/doc/plugins.rst Co-authored-by: Sebastian Castro <sebastian.a.castrofernandez@nasa.gov> * getting rid of accidentally left todos * updating nasa copyright * remove mention of urdf * cleaning FtsData struct * switching to single threaded executor * fix pre-commit * Update mujoco_ros2_control_plugins/src/fts_grav_comp_plugin.cpp Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com> * rename FtsData to FTsData * fixing last FTsData * ok maybe this is the last one... * Update mujoco_ros2_control_plugins/src/fts_grav_comp_plugin.hpp Co-authored-by: Erik Holum <erik.holum@nasa.gov> * wrong com size is failure * modifying docs to match test params * revert fts name change --------- Co-authored-by: Sebastian Castro <sebastian.a.castrofernandez@nasa.gov> Co-authored-by: Sai Kishor Kothakota <saisastra3@gmail.com> Co-authored-by: Erik Holum <erik.holum@nasa.gov>
Keeps the fork's staged xfrc/qvel plugin inputs and actuator-parameter staging alongside upstream's pre-step callback. Pre-step callbacks run after staged inputs are applied, and xfrc_applied is recorded after them so plugin-written wrenches are not mistaken for viewer drag forces. Plugins receive both reset() and on_reset(). Package versions stay at 999.0.1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mjWARN_VGEOMFULL was removed in MuJoCo 3.12; emit the same warning text MuJoCo's own simulate uses so the patch compiles across versions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cast mjtSize actuator counts to int in tests (-Werror=conversion with MuJoCo 3.12) and construct the TF broadcaster from the node reference, which Rolling's node-interfaces constructor requires. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tf2_ros::tf2_ros is a public link dependency, so downstream packages linking the exported target (e.g. mujoco_ros2_control_tests) need it found. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merges ros-controls/mujoco_ros2_control
main(c1bda9e, 28 commits) intoimpedence-control-support.Conflict resolution
999.0.1.xfrc_applied/qvelplugin inputs with a pre-step callback. The fork still uses the staged inputs (virtual gantry plugin, viewer drag capture) and the POSITION-impedance actuator-parameter staging (Support impedance control on MuJoCo POSITION actuators #9), so both mechanisms are kept. Upstream's merge also silently dropped the buffer initialisation, reset handling, viewer-drag capture and the per-write xfrc/qvel clearing; these are restored.mj_step, staged inputs are applied, then the pre-step callback runs.xfrc_appliedis recorded after the callback, so wrenches written inpre_step(e.g.ExternalWrenchPlugin) are not misclassified as viewer drag and re-applied after they expire.reset()(fork) andon_reset(data)(upstream).Testing
Local colcon build on Jazzy with
CMAKE_CXX_STANDARD=17:mujoco_ros2_control: 5/5 test suites pass.mujoco_ros2_control_plugins: 6/7 pass;test_3d_lidar_pluginneedsmujoco_extensions, which doesn't build against the installed MuJoCo (samemujoco/mjtnum.hfailure as the docker CI jobs).🤖 Generated with Claude Code