mrsp / serow

SEROW Framework for N Legged Robot Walking Estimation
GNU General Public License v3.0
78 stars 16 forks source link

some topic cann't subscibe sometimes #1

Closed crankler closed 5 years ago

crankler commented 5 years ago

Hello , I'm doing state estimation on quadruped robot, and I have some problem on calculate. I read your code struct and thesis , and apply some experiment from your code,and I just want to know how to subscribe all topic and don't miss anyone.

I use IMU+joint_states+foot_sensors try to calculate my baselink's move, imu is 100hz, joints have 50hz, 4 foot_sensor have 50hz , but there alway exists error result when sometimes can't subscribe /joint_states, so I try to Synchronize , but it can't work. https://answers.ros.org/question/322951/synchronize-imu-joint_states-foot_sensor-errors/

Can you give me some advice on how to avoid missing /joint-states msg? Thank you very much!

mrsp commented 5 years ago

Hello

In base estimation based on Newton-Euler floating mass dynamics, the IMU is used in the predict step (e.g. propagate your mean estimate) and the kinematics/leg odometry are commonly used in the filter's update step.

Thus, you dont need to synchronize the IMU + joint states + force measurements, but only the joint states with the force ones.

In your case, you will predict with the IMU twice and update once.

This is also the idea behind serow, if you were using it with a humanoid where you had imu @ 100hz and joint_states, F/T @ 50hz you would predict two times in a row and then update once.

If you are reading the code structure better read off my devel repo I am working on cleaning the structure and make it fairly easy to read and understand. A master-devel merge will come soon.

crankler commented 5 years ago

Yes, I know your way and I have read your papers, Thank you for your apply. But at now what confuse me is missing msg, just as follow:

图片2

The red line is the data I get from gazebo modelstate, and the bule line is my calculate on legodom, but there alway have data error bacause of can't subscirbe /joint_states, so when I see your project, I try to apply some experience from your code, but there still exist data miss, so my result is bad. Can you give me some advice on how to handle this problem? Thank you again!

mrsp commented 5 years ago

I see.

In order to properly answer your question i need to know the following:

Does your robot have point feet or flat feet? How fast is the gait the robot perform e.g. step time Is it a dynamic or a static gait?

Also but can't subscribe you mean that lose/don't receive some messages?

crankler commented 5 years ago

my quadruped robot use point feet, when 4 legs walk a cycle, the base can walk 0.25m, now it use static gait. yes, accroding to suscribe all topic, I found I can receive imu , foot sensors all time, but when I cann't get the /joint_states , the error will show.

Also my way is try to calculate the kinematics change of one leg of every step, and to add every step change for the sum move.

my email address is cranklersz@gmail.com, I mean use it can communicate quickly. Thank you again for your help!

mrsp commented 5 years ago

For a static low-pace gait, leg odometry should be very accurate, especially when the robot has point feet and unwanted rotation by the ankle joint (as is the case in humanoids) does not happen.

What you ask for seems like a robot specific driver issue, are you sure that the robot always publish joint states @ 50hz?

Furthermore, i consider 50hz for joints and F/T to be very slow for accurate kinematic-inertial base estimation, so errors are expected.

crankler commented 5 years ago

Just use the gait data of planning , I can get a good result.

At now my legodom calculate base on simulation in ros and gazebo, I just subscribe /joint_states and then handle all topic in a cycle just as your struct, but alway exists this kind of error, missing data maybe is a common thing, but your word is right.

maybe the foot judge have error, because I use effort control model in my simulation, so it can be effect by the ground friction and get a wrong joint_states and foot judge.

Or you can give me someother ideas? Thank you again!

mrsp commented 5 years ago

Yes, determining which leg is the support and later on use it in the leg odometry computation is of vital importance. An inaccurate choice of support can compromise the accuracy of leg odometry by a great deal.

I strongly encourage you to read my latest work (ICRA2019) on gait phase estimation: https://github.com/mrsp/gem

crankler commented 5 years ago

Ok, I will read your paper, and learn from your help. Thank you again for your help. I forget to say, these days I try to modify my configure, and now can use message filter for my computation, but threr still get a wrong result. At now I will try to find my error in code struct again.

mrsp commented 5 years ago

closed

mrsp commented 5 years ago

Hello Crankler

SEROW now supports quadruped robots if you are interested check it out.

Stelios