I’m using ardupilot in combination with ros (mavros) for my holonomic boat.
I want to make a map of a pool using gmapping, so I need some kind of odometry (and a laser which I have).
In the mavros topics, there is a topic mavros/local_position/odom, but this output is pretty random.
Is this odom based on the fusion of imu and gps, or is it just noise?
So my question is: how do I get reliable odometry with an imu and gps?
If I walk 100 meters in a straight line, my mavros/local_position/odom has a pose around 0 and a twist of ~1 m/s.
The frame_ID of the odom is map and the child_frame_id is base_link.
I have a working GPS and working IMU.
Do you have any idea what the cause of this is? And how I can solve this?
We are working on somthing similar.
I need to navigate my boat with ROS. And there are a lot of package that use odometry. So build a pseudo odometry msg from IMU and GPS would be very interesting. It will not have the same noise figure as wheel encoders, but at least we will have something to work with.
Yes, maybe, we can help eachother!
I’ve thought about using robot_localization to convert imu data to odometry data and then use gmapping to build a map en simultaniously localize in it. That didn’t workout though
Now my plan is to get a map using gmapping (or hector_slam), then use the map, odometry and the lidar data to localize with amcl. Then if I’m incredibly lucky so I have some time left, I can use some packages for navigation.
Yeah, that sounds logical and I hope you’re right.
Maybe the ekf is looking for information of the wheel odometry and if it can’t find it, it gives wrong values.
So maybe there is a parameter to turn of wheel odometry.
I just check that data from local_position/odom are correct . Just check that you get GPS lock and that you have a non-zero STREAM_POSITION rate ! (just set the rate in the paramter or use something like rosrun mavros mavsys rate --all 20)
I have sourced my ROS environment, but it looks like I have no scripts folder in my mavros package (see ls mavros of my previous answer).
Am I doing something wrong? or is my mavros package incomplete?
I run roslaunch mavros apm.launch on a console and get communication with pixhawk running ardurover.
In another console I run rosrun mavros mavsys rate --all 20
and then I run: rostopic echo /mavros/local_position/odom
I get odom message, but it does not change pose:pose:position part of the message according to the movement of the pixhawk. I walk with it in my backyard and position seems to be just noise around 0.
Does anybody try it on a real vehicle or just in sitl?
/mavros/global_position/local do show the change of position while I move the pix. But I don’t know if it is a GPS msg or an EKF result.
could it be an ardurover firmware problem?
I just made the same test with my quadrotor (pixhawk + copter 3.5.5) and I get odom message changes when I move my quad on my backyard.
But I don’t get this on my boat…
Ok, that is!!!
I have ARMING_REQUIRE set to 1 and I was testing without arming the rover.
I, now, test it with ARMING_REQUIERE set to 0 and it is working ok.
Is there some information about local coordinate frame? what does x and y mean?