How to give velocity command and line velocity obs of robot when "sim to real"?

I want apply the protrained model to “bittle dog” (vary like anymal ,but only 8 dof and IMU). model is trained by obs (base_lin_vel、base_ang_vel、projected_gravity、commands、dof_pos、dof_vel - like anymal task in omniisaacgymenvs).
my question is :

  1. IMU only give acceleration, not velocity! can I get velocity from acceleration? or I need change obs – from velocity to acceleration?
  2. how can get projected_gravity from IMU?
    Btw isaas sim is really powerful , I like it very much!!!

I have known velocity command meaning . now question is “how line velocity get from IMU” ?

Hi @kanghua151,
Could you share the repo with the pre-trained model you were referring to incase it’s a custom environment?

Regarding your question, there are many implementations of RL policies for quadrupeds that use [roll, pitch, joint positions, joint velocities …] instead of base linear and angular velocity. Since the training is done in simulation, you can use base linear and angular velocities in your reward functions (if needed) to obtain a velocity conditioned policy.

For example, if you wish to implement a basic RL policy that would walk forward with a given goal_velocity, you could pass the goal_velocity in the observation and have a reward that tracks the difference between the current velocity and goal velocity.

Alternatively, if you do not wish to modify your observations, you could consider a multi-sensor fusion with some filter (EKF and so on…) to calculate the velocities and pass them on to the policy.

Hope this answers your question.

1 Like

thanks a lot !