Strange results with robot_localization and navsat_transform_node
Hi to all, hi @tom-moore
I finally solved all the problems about my system configuration and now I'm able to integrate my GPS data in ekf_localization_node
by using the navsat_transform_node
.
I'm using two ekf_localization_node
instances: the first which includes only continuous data (/imu/data
, /husky_velocity_controller/odom
) and the second which includes also the gps data (/imu/data
, /husky_velocity_controller/odom
, /fix
).
The /odometry/gps topic publishes non-zero values, so I think it is working fine. The problem is that I obtain strange results in RVIZ and I can't understand the reason. It seems that the localization is not working properly, but I can't understand the reason.
In this test, the robot is moving forward, but RVIZ is showing random behavior.
This is my OLD recorded bag file, it contains only the related topics.
*EDIT 4 - May 04 2017 *
rosrun xsens_driver mtnode.py _frame_id:="base_imu"
[WARN] [WallTime: 1493887014.830545] Cannot find value for parameter: ~device, assigning default: auto
[WARN] [WallTime: 1493887014.832072] Cannot find value for parameter: ~baudrate, assigning default: 0
[WARN] [WallTime: 1493887014.833512] Cannot find value for parameter: ~timeout, assigning default: 0.002
[INFO] [WallTime: 1493887014.867422] Detected MT device on port /dev/ttyUSB0 @ 115200 bps
[INFO] [WallTime: 1493887014.867611] MT node interface: /dev/ttyUSB0 at 115200 bd.
[INFO] [WallTime: 1493887014.877234] Found parameter: ~frame_id, value: base_imu
[WARN] [WallTime: 1493887014.878095] Cannot find value for parameter: ~frame_local, assigning default: ENU
I used the compass on my Android device in order to align the IMU so the readings are not accurate at 100%, but they should give the idea about the output I get:
**NORTH**:
X: 0.00150562881026,
Y: 0.00796461943537,
Z: -0.605336606503,
W: 0.795928359032
Degree: -74 degrees
**EST**:
X: -0.00401881383732
Y: 0.00927101075649
Z: -0.929714620113
W: -0.368142217398
Degree: +136 degrees
**SOUTH**:
X: 0.00913885235786
Y: -0.0002562062582
Z: -0.989742994308
W: -0.142566725612
Degree: +163 degrees
**WEST**:
X: 0.00891534984112
Y: -0.00214970414527
Z: -0.877696692944
W: 0.479128926992
Degree: -122 degrees
----------
**NORTH**:
X: 0.00407045986503
Y: 0.0111895436421
Z: 0.44247585535
W: 0.896631300449
Degree: +52 degrees
**WEST**:
X: -0.00214476278052
Y: 0.0111895436421
Z: -0.225669115782
W: 0.974137365818
Degree: -26 degrees
**SOUTH**:
X: 0.0114099625498
Y: 0.00554236397147
Z: -0.679173827171
W: 0.733830630779
Degree: -85 degrees
**EST**:
X: 0.0114099625498
Y: 0.00554236397147
Z: 0.0801176950336
W: 0.996705293655
Degree: +9 degrees
Output by using the IMU software:
North: -108 degrees
WEST: -40 degrees
SOUTH: +38 degrees
EST: +135 degrees
END EDIT 4
EDIT3 - May 01 2017
This screenshot has been made by using this bag file and this launch file.
During this test, the robot was commanded to follow a straight path.
I expect to see the odometry/gps
and the /husky_velocity_controller/odom
to be parallel (or coincident) to the /odometry/filtered/global
and /odometry/filtered/local
output.
Fixed frame: map
Pink: /husky_velocity_controller/odom
Red: /odometry/gps
Green: /odometry/filtered/global
Blue: /odometry/filtered/local
Figure 1: results with odom
and map
frame changed like in ...
Can you please be more descriptive about what exactly is not right about the behavior? Maybe post a video, and say what you are expecting to see vs. what you are seeing? Apologies, it's just that viewing bag files can be very time-consuming.
Thanks for your help. I upload a video on Youtube. In the real test, the robot was moving straight forward for few meters while on RVIZ I see that it is drifting randomly like if there was an error on the odometry calculation. I can't explain why.
Pleases define "not working". Produce an rviz image (not video) like I did below. Tell me what each color represents, and please tell me what the "Fixed Frame" is in rviz.
I added the details as a new answer in order to make it readable.
Much clearer, and I have answers for you, but can you first make the view orthographic for me (TopDownOrtho setting under Views)? It will help a bit.
I also note that there are two sets of green arrows: one aligns precisely with the blue arrows (they are "mixed" together), and the other is slightly offset.
I edited the answer in order to add the TopDownOrtho view.
/odometry/filtered/global
is affected by some jumps during the execution in RVIZ and this results in the green arrows with the offset close to the green/blue mixed arrows.If you watch this video you can see the jumps of the
/odometry/filtered/global
with the green arrows.