Ask Your Question
0

robot_localization: How to state start position (x,y,z,r,p,y) for ekf

asked 2019-02-20 04:10:59 -0500

solkristoffer gravatar image

Im using UUV_simulator combined with your robot_localization package. I have been successfully been able to implement ekf with DVL, IMU and Pressure Sensor. The odometry estimate all start at (x,y,z,r,p,y) = (0,0,0,0,0,0), but I would like to start the node at my launch position in Gazebo simulator. How can I do this? I want my robot to launch at position (15,-20,0, 0,0,0) so that the ekf estimate proper pose interms of gazebo world frame.

Can I state the initial coordinates of my vehicle to the EKF somehow? mabye in the launch file?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2019-02-20 09:39:05 -0500

mgruhler gravatar image

updated 2019-02-20 09:39:58 -0500

According to the docs, this is what the initial_state parameter is for.

Note that this will start the respective filter, i.e. ekf_localization_node or ukf_localization_node (*) there, and not your odometry. This will still start at all zeros, as is expected for an odometric sensor.

Also note that the the estimate will deviate more and more from the actual position, as it is just incorporating odometric information and can thus not correct for errors there.

(*) I'm assuming you're using one of those two nodes, due to your title, description and the tags you used. If this is not the case, please state clearly which node you are using.

edit flag offensive delete link more
0

answered 2019-02-20 10:20:17 -0500

solkristoffer gravatar image

updated 2019-02-20 10:21:43 -0500

Yea, that worked, thank you! Just added the initial_state to the ekf_template.yaml file. I found out you could also do the same by using the setPose rosservice function.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-02-20 04:10:59 -0500

Seen: 109 times

Last updated: Feb 20