Struggling to set up Newton/MuJoCo manipulator

Typically: "How do I... ", "How can I... " questions
Post Reply
RalfR
Posts: 18
Joined: 28 May 2019, 09:18

Struggling to set up Newton/MuJoCo manipulator

Post by RalfR »

I am still struggling to set up a complete 8DoF manipulator arm with a force sensor in its base. The general setup is working, but the numbers I receive for the base force/torques seem to be wrong. I use a fully dynamic manipulator with position controllers. With the exception of the MuJoCo armature parameter, I use the default engine parameters, as it is used by the demo model robots.

For the Newton physics engine: The robot seems to behave well, however, I get an offset value of 20-100N for the forces at the base, even if there is no motion commanded and the gravity is switched off. It is quite a stable, reproducible offset error, but I have no idea where it is originating.

For the MuJoCo physics engine: The offset value does not appear when using this engine. However, when I try to move the manipulator, there is a lot of oscillation in the commanded torque values for the joints, with quite substantial Nm values reached. With higher speeds, this leads to a 'trembling' of the whole robot, and the target position (set by sim.setJointTargetPosition) is never exactly reached, leaving the manipulator in its oscillating behaviour. This behaviour remains even if the force-torque sensor is removed, the joint masses are equally distributed, and the armature value of all joints is increased (up to 20).

Does any of this sound like a known issue ? Do I make some fundamental mistakes ?

coppelia
Site Admin
Posts: 10375
Joined: 14 Dec 2012, 00:25

Re: Struggling to set up Newton/MuJoCo manipulator

Post by coppelia »

Hello,

can you post a link to that scene?

What can happen:
  • There are internal collision responses. You can visualize those with [Menu bar > Modules > Tools > Contact display]
  • masses and inertias are exagerated. Sometimes demo models use mass and inertia values that work well with most physics engines. But MuJoCo and Newton should manage quite well realistic values. Select the the robot, then click [Menu bar > Edit > Shape mass and inertia > Compute from uniform density...] then click [Menu bar > Tools > Visualize inertias]
  • When moving the base of a robot via mouse or programmatically, you are effectively inducing infinite forces, since the motion is immediate. This is different from e.g. a dynamically enabled joint accelerates and pushes the robot, or a mobile base gradually moves the robot according to the rules of physics
Cheers

zorro
Posts: 27
Joined: 06 Nov 2023, 09:31

Re: Struggling to set up Newton/MuJoCo manipulator

Post by zorro »

RalfR wrote: 08 Dec 2023, 13:40 I am still struggling to set up a complete 8DoF manipulator arm with a force sensor in its base. The general setup is working, but the numbers I receive for the base force/torques seem to be wrong. I use a fully dynamic manipulator with position controllers. With the exception of the MuJoCo armature parameter, I use the default engine parameters, as it is used by the demo model robots.

For the Newton physics engine: The robot seems to behave well, however, I get an offset value of 20-100N for the forces at the base, even if there is no motion commanded and the gravity is switched off. It is quite a stable, reproducible offset error, but I have no idea where it is originating.

For the MuJoCo physics engine: The offset value does not appear when using this engine. However, when I try to move the manipulator, there is a lot of oscillation in the commanded torque values for the joints, with quite substantial Nm values reached. With higher speeds, this leads to a 'trembling' of the whole robot, and the target position (set by sim.setJointTargetPosition) is never exactly reached, leaving the manipulator in its oscillating behaviour. This behaviour remains even if the force-torque sensor is removed, the joint masses are equally distributed, and the armature value of all joints is increased (up to 20).

Does any of this sound like a known issue ? Do I make some fundamental mistakes ?
About the oscillation issue with the robotic arm, I have also encountered a similar problem. In my case, when exporting a seven-degree-of-freedom robotic arm from SolidWorks as a URDF model and importing it into CoppeliaSim, I observed oscillations during simulation startup. Despite my reluctance to experience such behavior, it seemed to align with real-world physics. Later, I discovered that this was caused by inertia values. My workaround was to apply the inertia values of the built-in robotic arm in the software to the custom robotic arm. Although this deviates from the inertia settings in SolidWorks, it at least resolved the excessive oscillation problem during simulation.

Post Reply