How to create a plugin for several actuators? #2519
Unanswered
pucciland95
asked this question in
Asking for Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hi!
I am a Robotics Engineer at Hiro Robotics in Italy; I use MuJoCo for my research on Reinforcement Learning and Imitation Learning.
My setup
Mujoco version: 3.2.6, API: C, OS: Linux Ubuntu 22.04 Linux
My question
I am trying to develop a Ros2 Control package for Mujoco so that it is possible to make the robot move from ROS2 and load it as a Mujoco Plugin to use it in combination with other plugins.
As of now, I have managed to make the plugin work, and the robot is controllable from ROS2. However, the robot moves because I set the joint state (aka
qvel
inmj_data
). This is not consistent since when I make my robot collide with the objects in the workspace, it passes through them since it is not a 'real' control input.This is how I am currently doing to 'control' the robot in mujoco:
if (joint_state.is_velocity_control_enabled) mj_data_->qvel[joint_state.mj_vel_adr] = joint_state.velocity_command;
Therefore, since the ur10e model exposes some
actuators
:I wanted to get them in my plugin and control them. However, I do not understand why my plugin cannot find them.
Here how I look for the actuators:
Probably the reason is that my plugin has only the following capability:
Setting the
mjPLUGIN_ACTUATOR
requires specifying the transmission associated with the plugin; however, I have several transmissions to associate with the plugin since the robot has 6 degrees of freedom.Is it possible to achieve this? Is there some other way I am not considering here?
Here is the repo as a reference.
Minimal model and/or code that explain my question
No response
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions