navsat_transform_node with /odometry/gps null [closed]
I'm trying to fuse GPS data in robot_localization node with IMU and wheel encoders.
I'm running a single instance of ekf_localization_node
which takes as inputs IMU (/imu)
, wheel encoders and my GPS (/fix
).
Unfortunately, something is not working since I always get null values in /odometry/gps
topics.
I hope you can help me and I'm sorry for my long topic!
I recorded a bag file with my acquisitions and these are some details. When I try to run it in RVIZ, I get this error:
[ERROR] [1489693341.983362616, 7.022000000]: Could not obtain transform from odom->base_link
This is my launch file:
<?xml version="1.0"?>
<launch>
<rosparam command="load" file="$(find husky_control)/config/control.yaml" />
<node name="base_controller_spawner" pkg="controller_manager" type="spawner" args="husky_joint_publisher husky_velocity_controller --shutdown-timeout 3"/>
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" respawn="true">
<param name="magnetic_declination_radians" value="0.0640"/>
<param name="yaw_offset" value="1.5707963"/>
<remap from="/imu/data" to="/imu" />
<remap from="/gps/fix" to="/fix" />
<remap from="/odometry/filtered" to="/odometry/filtered" />
</node>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_localization">
<rosparam command="load" file="$(find husky_control)/config/test.yaml" />
<param name="two_d_mode" value="false"/>
</node>
<node pkg="interactive_marker_twist_server" type="marker_server" name="twist_marker_server" output="screen"/>
<node pkg="twist_mux" type="twist_mux" name="twist_mux">
<rosparam command="load" file="$(find husky_control)/config/twist_mux.yaml" />
<remap from="cmd_vel_out" to="husky_velocity_controller/cmd_vel"/>
</node>
<node pkg="tf" type="static_transform_publisher" name="base_to_realsense"
args="-0.3 0 1.1 1.5 3.14 1.5 /front_bumper_link /realsense_frame 100" />
<node pkg="tf" type="static_transform_publisher" name="base_to_laser"
args="-0.3 0 0.6 0 0 0 /front_bumper_link /laser 100" />
<node pkg="tf" type="static_transform_publisher" name="base_to_color"
args="0 0 0 0 0 0 /realsense_frame /camera_color_optical_frame 100" />
<node pkg="tf" type="static_transform_publisher" name="base_to_depth"
args="0 0 0 0 0 0 /realsense_frame /camera_depth_optical_frame 100" />
<!-- <node pkg="tf" type="static_transform_publisher" name="base_to_imu"
args="0 0 0 0 0 0 /imu_link /base_imu 100" /> -->
<node pkg="tf" type="static_transform_publisher" name="base_to_gps"
args="-0.3 0 0.9 0 0 0 /front_bumper_link /gps 100" />
<node pkg="tf" type="static_transform_publisher" name="base_to_imu"
args="0 0 0 0 0 0 /base_link /base_imu_link 100" />
</launch>
and my test.yaml file:
map_frame: map
odom_frame: odom
base_link_frame: base_link
world_frame: map
two_d_mode: false
frequency: 50
odom0: husky_velocity_controller/odom
odom0_config: [true, true, false,
false, false, true,
true, false, false,
false, false, true,
false, false, false]
odom0_differential: false
odom0_queue_size: 10
imu0: imu
imu0_config: [false, false, false,
true, true, true,
false, false, false,
true, true, true,
true, true, true]
imu0_differential: false
imu0_queue_size: 10
imu0_remove_gravitational_acceleration: true
odom1: odometry/gps
odom1_config: [true, true, true,
false, false, false,
false, false, false,
false, false, false,
false, false, false]
odom1_differential: false
This is my TF tree.
This is the output of my /imu
node:
header:
seq: 8942
stamp:
secs: 1489494054
nsecs: 946403026
frame_id: base_imu_link
orientation:
x: 0.0261382685519
y: 0.00569945633341
z: -0.179503324187
w: 0.983393544681
orientation_covariance: [0.0025, 0.0, 0.0, 0.0, 0.0025, 0.0, 0.0, 0.0, 0.0025]
angular_velocity:
x: 0.05 ...
Any tips or suggestions, guys?
Hello guys, Hello @tom-moore , can't you help me with my problem? I didn't found a solution, yet :(
Did you solve this?
Hello Tom, yes I solved it, it was a problem related to my IMU node. Now it is working, but I'm getting strange results as described in this topic I'll make a video to show you my problem
Is this question still valid, given your others?
This question is solved thanks to your help!
Hello guys, I am still facing this problem. @Marcus, can you tell how you solved it?
It was a problem related to my IMU and GPS frames names.