Replies: 15 comments 8 replies
-
It is not clear to me if we should set |
Beta Was this translation helpful? Give feedback.
-
Maybe the actual problem is coming from the fact that those specifications are not really working this way in really. In the real world, velocity limit does not exist. If you have some external source of torque, you could spine the joint as fast as you want. In practice, there is a relation between motor torque and angular velocity which limits the measured velocity ultimately. Without external source of energy, the joint velocity is therefore limited. What I said previous still stand. I don't know what we want to do in this scenario. It was specified in the URDF that the joints are not supposed to spine faster than some maximum velocity, and I think we should honour that by default. Whether some command torque is capable of invalidating the current state is an another issue. Here it is the case because the actuators are very powerful. But I'm also expecting the system to break if you start standing random torques to the actuators in reality, so it is not a false positive. |
Beta Was this translation helpful? Give feedback.
-
In my view, It is the responsibility of the practitioner to send sensible commands to the robot to avoid invalidating the robot state. As much as you cannot explore randomly in reality, you should be careful when exploring in simulation. Such issue would not appear when plugging a low-level PD controller with velocity bounds for instance. |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to send an additional warning message when the commanded torque is unfeasible given the velocity limits ? I feel like this behavior is not explicit enough, especially in the learning situation. |
Beta Was this translation helpful? Give feedback.
-
How to detect this is not straightforward as it depends on the dynamics of the whole system. Maybe some estimate based on the apparent inertia could be computed but it would only be rough approximation as it also involves all the external forces, mechanical constraints...etc. I agree it would be nice to detect such issue differently than just detecting than the observation is out of bounds but I'm not sure it can be predicted reliably. I'm still convinced that controlling a robot in torque is tricky and should be avoided if possible, one of the reason being unreasonable joint velocities when sending random commands. |
Beta Was this translation helpful? Give feedback.
-
Ok, yes I understand your point. Does Atlas has default acceleration limit as well ?
|
Beta Was this translation helpful? Give feedback.
-
You should have a look to |
Beta Was this translation helpful? Give feedback.
-
Ok thanks, I will have a look. |
Beta Was this translation helpful? Give feedback.
-
You should be more restrictive than that. Satisfying the limits for the command is not enough to make sure that the measure is not out of bounds. That is why the threshold are much lower in |
Beta Was this translation helpful? Give feedback.
-
I converted this issue in a discussion since what to do it this point is not clear to me. |
Beta Was this translation helpful? Give feedback.
-
So I have tried doing a step with DigitPDControlJiminyEnv, but I also get a Reproduction script: from gym_jiminy.envs.digit import DigitPDControlJiminyEnv
if __name__ == '__main__':
env = DigitPDControlJiminyEnv()
obs, _ = env.reset()
env.step(env.action_space.sample()*0.0)
print(env.has_terminated()) It is truncated due to the difference: print(obs["measurements"]["EffortSensor"] - env.observation["measurements"]["EffortSensor"]) |
Beta Was this translation helpful? Give feedback.
-
Here's some insight about |
Beta Was this translation helpful? Give feedback.
-
Could you share the model that is used at Wandercraft for limiting the output motor torque based on its velocity ? So that I can check whether it can be implemented at jiminy level without introducing too many advanced motor parameters. I will also have a look on my side. |
Beta Was this translation helpful? Give feedback.
-
The problem has been fixed for Atlas on |
Beta Was this translation helpful? Give feedback.
-
OK #801 fixes the issue for all PID controlled robotic environments . Closing ! |
Beta Was this translation helpful? Give feedback.
-
Reproduction scripts:
I am not able to run an Atlas simulation for more than
step_dt
because truncated is set to true by env._contains_observation() after the first step. I am not sure this is the desired behavior. Since the observation is clipped by the observation_space after being returned by step, it seems contradictory to return truncated = True when the unclipped observation is outside the observation_space. Even though, even without clipping the observation, the simulator should not return observation outside the observation_space, no ?Difference between obs and env.observation (respectively clipped and unclipped) are just observed on ["states"]["agent"]["v"] and the v_measurement of ["measurements"]["EncoderSensor"].
Beta Was this translation helpful? Give feedback.
All reactions