Hi,
I'm working with Parrot's Bebop2 (using bebop_autonomy) and trying to adjust robot localization for it. I created designated imu and twist topics that align with the ENU conventions and include covariances for all the relevant topics.
I currently have one instance of robot localization that fuses the continuous information (imu and twist), one instance of navsat_transform_node and later I would like to add a second instance of robot localization that fuses the outputs of the two latter.
When plotting the outputs of the first instance of robot_localization (/odometry/filtered) and navsat_transform, I get that they are rotated and the rotation angle is dependent on the drone's initial yaw angle. For example, when the drone is facing south during flight time, I get the following:
This is my main launch file (for robot localization):
<launch>
<arg name="tf_prefix" default="" />
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization_continuous">
<rosparam command="load" file="$(find bebop_localization)/config/robot_localization_continuous.yaml" />
<param name="tf_prefix" value="$(arg tf_prefix)" />
<remap from="odometry/filtered" to="odometry/filtered/continuous"/>
</node>
<include file="$(find bebop_localization)/launch/navsat_transform.launch" />
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization_global">
<rosparam command="load" file="$(find bebop_localization)/config/robot_localization_global.yaml" />
<param name="tf_prefix" value="$(arg tf_prefix)" />
<remap from="odometry/filtered" to="odometry/filtered/global"/>
</node>
</launch>
and this is my launch file for navsat_transform:
<launch>
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" clear_params="true" respawn="true">
<rosparam command="load" file="$(find bebop_localization)/config/navsat_transform.yaml" />
<remap from="imu/data" to="imu"/>
<remap from="gps/fix" to="fix"/>
<remap from="odometry/filtered" to="odometry/filtered/continuous"/>
</node>
</launch>
Below are the config (yaml) files:
robot_localization_continuous.yaml:
frequency: 30
sensor_timeout: 0.1
two_d_mode: false
print_diagnostics: true
publish_tf: true
publish_acceleration: false
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: odom
twist0: speed
twist0_config: [false, false, false,
false, false, false,
true , true , true ,
false, false, false,
false, false, false]
twist0_queue_size: 2
twist0_nodelay: false
twist0_differential: false
twist0_relative: false
imu0: imu
imu0_config: [false, false, false,
true, true, true,
false, false, false,
false, false, false,
false, false, false]
imu0_nodelay: false
imu0_differential: false
imu0_relative: true
imu0_queue_size: 5
imu0_pose_rejection_threshold: 0.8
imu0_twist_rejection_threshold: 0.8
imu0_linear_acceleration_rejection_threshold: 0.8
navsat_transform.yaml:
frequency: 30
magnetic_declination_radians: 0
yaw_offset: 0.0
zero_altitude: false
wait_for_datum: false
My code is accessible under https://github.com/CearLab/bebop_autonomy/tree/indigo-devel/bebop_localization.
Thanks!
Originally posted by Omer on ROS Answers with karma: 26 on 2017-02-20
Post score: 0
Original comments
Comment by Tom Moore on 2017-02-21:
Can you post your launch file/config file for r_l, sample input messages, and some messages showing your IMU's output when facing north, south, east, and west? Images are also helpful.
Comment by Omer on 2017-02-22:
Thanks Tom for your response. I added more information to my post above. I also shared some sample messages, one bag file and the plotting script here.
Comment by Tom Moore on 2017-03-01:
Cool, I will check this out.