Assistance with Control system in MuJoCo #2007
Replies: 2 comments
-
Related to #1375 |
Beta Was this translation helpful? Give feedback.
-
@yuvaltassa
You can see that I print my command position and the joint position after running mj_step every time I loop. The obtained results are as follows: |
Beta Was this translation helpful? Give feedback.
-
Dear MuJoCo Support Team,
I am currently working on a project involving a robotic simulation in MuJoCo, where I aim to control the robot's joints based on target positions.
The version of mujoco is 3.1.2
The version of python is 3.8.17
I've tried using velocity controllers, position controllers, and even modifying qpos directly to control the robotic arm. However, all controllers have resulted in very poor control outcomes. Below is the XML file of the robot used in my research.
As I said, I have tried three to control the robot. The codes use for control is below:
To check the method, I print the target position, and the qpos after the control part worked.
1. For velocity,
I use the mujoco.mj_step 10 times. And I have set timestep="0.1" in xml. I have print the following result
From the results above, you can see that it is basically impossible to move the robotic arm at the speed set by the action. Additionally, in the qpos results of step 8, there is an abnormal data point, 12.761484387779488, which also exceeds the range of the corresponding joint, 'yaw'.
2. For position
In order to make the robotic arm approach the target smoothly, I will take 20 steps to gradually bring the position closer to the final target_position. The print result show in blow.
As you can see, the data here are basically highly abnormal results. The output qpos essentially exceeds the settings I made for joints and actuators in the XML file. I learned that a position actuator essentially acts like a spring. Therefore, I can understand if there's a slight deviation between the final position of the robotic arm and the position I specified. However, such substantial errors are beyond my comprehension.
3. For changing qpos
I used a method similar to the position approach, allowing the robotic arm to move towards the target position in 10 steps. The results obtained are as follows:
At Action at step: 3, you can see that I directly modified qpos, but there is still a discrepancy between the final position of the robotic arm and my target position. And at Action at step: 4, you can see that a massive error occurred directly.
So why those error happened?
Beta Was this translation helpful? Give feedback.
All reactions