State estimation for legged robot
In a state estimation method for a legged robot, first sensor information and second sensor information of the legged robot are received. First state information of the legged robot for a period of time is determined, via a first Kalman filter, based on the first sensor information and the second sensor information. Third sensor information of the legged robot is received. Second state information of the legged robot is determined, via a second Kalman filter, based on the third sensor information and the first state information for the period of time. First state information of the legged robot at a current time is updated based on the second state information of the legged robot, to determine state information of the legged robot at the current time.
1 . A state estimation method for controlling a motor of a legged robot, the method comprising:
receiving first sensor information from a first sensor of the legged robot at a first observation frequency and second sensor information from a second sensor of the legged robot at a second observation frequency;
determining, via a first Kalman filter, first state information of the legged robot for a period of time based on the first sensor information and the second sensor information, the first state information indicating first position information of a body of the legged robot, first velocity information of the body of the legged robot, and leg position information of legs of the legged robot in a world coordinate system;
receiving third sensor information from a third sensor of the legged robot at a third observation frequency that is less than the first observation frequency and the second observation frequency, the third sensor information indicating second position information of the body of the legged robot and second velocity information of the body of the legged robot in the world coordinate system;
determining, via a second Kalman filter, second state information of the legged robot based on the third sensor information and the first state information for the period of time; and
determining a position of the legged robot and a velocity of the legged robot at a current time through updating a subset of the first state information of the legged robot corresponding to the current time based on the second state information of the legged robot,
wherein the motor of the legged robot is controlled based on the position of the legged robot and the velocity of the legged robot at the current time.
2 . The method according to claim 1 , wherein
the second sensor is a joint encoder, and
the determining the first state information includes:
determining motion information of the legged robot based on the second sensor information and a leg kinematics model of the legged robot; and
determining the first state information of the legged robot via the first Kalman filter at least partially based on the motion information.
3 . The method according to claim 1 , wherein
the first sensor information and the second sensor information each have a timestamp, and
the determining the first state information includes:
successively inputting the first sensor information and the second sensor information into the first Kalman filter;
performing state estimation via the first Kalman filter to obtain the first state information of the legged robot having a timestamp; and
storing the first state information having the timestamp as historical information of the second Kalman filter, the first state information including a plurality of state estimation results having timestamps outputted by the first Kalman filter.
4 . The method according to claim 3 , wherein the determining the second state information comprises:
determining a timestamp corresponding to the third sensor information;
inputting the historical information corresponding to the timestamp of the third sensor information and the third sensor information into the second Kalman filter; and
performing state estimation via the second Kalman filter to obtain a state estimation result corresponding to the timestamp of the third sensor information, the second state information including the state estimation result corresponding to the timestamp.
5 . The method according to claim 4 , wherein the performing the state estimation via the second Kalman filter comprises:
determining a state estimation result in the historical information corresponding to the timestamp based on the timestamp corresponding to the third sensor information; and
performing the state estimation via the second Kalman filter based on the third sensor information and the state estimation result in the historical information corresponding to the timestamp, to obtain the state estimation result corresponding to the timestamp.
6 . The method according to claim 5 , wherein the updating the subset of the first state information comprises:
superposing a state increment of the second state information relative to the first state information to the subset of the first state information of the legged robot corresponding to the current time, to determine the position of the legged robot and the velocity of the legged robot at the current time.
7 . The method according to claim 1 , wherein the first Kalman filter comprises a prediction model and an observation model, the prediction model being configured to obtain a prediction state and a corresponding covariance through the first sensor information, and the observation model being configured to obtain an observation state and a corresponding covariance through the second sensor information.
8 . The method according to claim 5 , wherein the performing the state estimation via the second Kalman filter comprises:
storing a posteriori state and a posteriori covariance obtained by the first Kalman filter within an interval of a historical data window that corresponds to a maximum delay value of the third sensor information; and
fusing a priori state corresponding to the posteriori state, a priori covariance corresponding to the posteriori covariance, and observation information of the second Kalman filter to obtain the state estimation result corresponding to the timestamp.
9 . The method according to claim 7 , wherein the observation model is configured to perform state observation at least partially based on a leg kinematics model of the legged robot, and the leg kinematics model is configured to indicate a relative position and velocity relationship between a center of mass and a foot end of the legged robot.
10 . The method according to claim 9 , wherein
the observation model is configured to calculate a relative position measurement residual between the body and the foot end of the legged robot and a relative velocity measurement residual between the body and the foot end of the legged robot based on the leg kinematics model of the legged robot; and
the relative position measurement residual between the body and the foot end of the legged robot and the relative velocity measurement residual between the body and the foot end of the legged robot is included in state observation data.
11 . The method according to claim 5 , further comprising:
calculating accumulated errors for correcting state estimation information of the first Kalman filter based on the second position information of the body of the legged robot and the second velocity information of the body of the legged robot in the world coordinate system corresponding to the timestamp of the third sensor information.
12 . The method according to claim 1 , wherein
the first sensor includes an inertial measurement unit (IMU) sensor,
the second sensor includes a joint encoder, and
the third sensor includes at least one of a distance sensor, a camera, a radar, a position sensor, or a laser sensor.
13 . The method according to claim 12 , wherein
the first observation frequency ranges from 0.1 kilohertz (kHz) to 1.0 kHz,
the second observation frequency ranges from 0.1 kHz to 1.0 kHz, and
the third observation frequency ranges from 10 Hz to 50 Hz.
14 . A state estimation apparatus for controlling a motor of a legged robot, the state estimation apparatus comprising:
processing circuitry configured to:
receive first sensor information from a first sensor of the legged robot at a first observation frequency and second sensor information from a second sensor of the legged robot at a second observation frequency;
determine, via a first Kalman filter, first state information of the legged robot for a period of time based on the first sensor information and the second sensor information, the first state information indicating first position information of a body of the legged robot, first velocity information of the body of the legged robot, and leg position information of legs of the legged robot in a world coordinate system;
receive third sensor information from a third sensor of the legged robot at a third observation frequency that is less than the first observation frequency and the second observation frequency, the third sensor information indicating second position information of the body of the legged robot and second velocity information of the body of the legged robot in the world coordinate system;
determine, via a second Kalman filter, second state information of the legged robot based on the third sensor information and the first state information for the period of time; and
determine a position of the legged robot and a velocity of the legged robot at a current time through an update of a subset of the update-first state information of the legged robot corresponding to the current time based on the second state information of the legged robot,
wherein the motor of the legged robot is controlled based on the position of the legged robot and the velocity of the legged robot at the current time.
15 . The state estimation apparatus according to claim 14 , wherein
the second sensor is a joint encoder, and
the processing circuitry is configured to:
determine motion information of the legged robot based on the second sensor information and a leg kinematics model of the legged robot; and
determine the first state information of the legged robot via the first Kalman filter at least partially based on the motion information.
16 . The state estimation apparatus according to claim 14 , wherein
the first sensor information and the second sensor information each have a timestamp, and
the processing circuitry is configured to:
successively input the first sensor information and the second sensor information into the first Kalman filter;
perform state estimation via the first Kalman filter to obtain the first state information of the legged robot having a timestamp; and
store the first state information having the timestamp as historical information of the second Kalman filter, the first state information including a plurality of state estimation results having timestamps outputted by the first Kalman filter.
17 . The state estimation apparatus according to claim 16 , wherein the processing circuitry is configured to:
determine a timestamp corresponding to the third sensor information;
input the historical information corresponding to the timestamp of the third sensor information and the third sensor information into the second Kalman filter; and
perform state estimation via the second Kalman filter to obtain a state estimation result corresponding to the timestamp of the third sensor information, the second state information including the state estimation result corresponding to the timestamp.
18 . The state estimation apparatus according to claim 17 , wherein the processing circuitry is configured to:
determine a state estimation result in the historical information corresponding to the timestamp based on the timestamp corresponding to the third sensor information; and
perform the state estimation via the second Kalman filter based on the third sensor information and the state estimation result in the historical information corresponding to the timestamp, to obtain the state estimation result corresponding to the timestamp.
19 . A legged robot, comprising:
a first sensor configured to obtain first sensor information of the legged robot;
a second sensor configured to obtain second sensor information of the legged robot;
a third sensor configured to obtain third sensor information of the legged robot; and
the state estimation apparatus according to claim 14 .
20 . A non-transitory computer-readable storage medium storing instructions which, when executed by a processor, cause the processor to perform a state estimation method for controlling a motor of a legged robot, the method comprising:
receiving first sensor information from a first sensor of the legged robot at a first observation frequency and second sensor information from a second sensor of the legged robot at a second observation frequency;
determining, via a first Kalman filter, first state information of the legged robot for a period of time based on the first sensor information and the second sensor information, the first state information indicating first position information of a body of the legged robot, first velocity information of the body of the legged robot, and leg position information of legs of the legged robot in a world coordinate system;
receiving third sensor information from a third sensor of the legged robot at a third observation frequency that is less than the first observation frequency and the second observation frequency, the third sensor information indicating second position information of the body of the legged robot and second velocity information of the body of the legged robot in the world coordinate system;
determining, via a second Kalman filter, second state information of the legged robot based on the third sensor information and the first state information for the period of time; and
determining a position of the legged robot and a velocity of the legged robot at a current time through updating a subset of the first state information of the legged robot corresponding to the current time based on the second state information of the legged robot,
wherein the motor of the legged robot is controlled based on the position of the legged robot and the velocity of the legged robot at the current time.