How to use robot_localization without IMU topic
Hi!
I'm new to ROS and I'm trying to combine GPS (sensor_msgs / NavSatFix) and wheel odometry (nav_msgs / Odometry) into one odometry using robot_localization. However, in the current file, the odometry (odometry / gps) published by navsat_transform_node has all parameters other than time set to 0, and the conversion has failed.
As another item:
- I use the topic from nmea_navsat_driver (GPS)
- I use the topic from turtlebot2 (wheel Odometry)
- I don't use IMU topic
- I edited robot_localization only launch file and yaml file
These are the two things I want to do.
- Convert GPS data to odometry
- Integrate GPS data and Odometry data using ekf_localization_node
What's wrong? I'm new to ROS, so the information I've written here may not be enough. We will publish as much as possible if necessary.
The message displayed when the conversion fails is:
[ WARN] [1630648010.633966680]: Could not obtain transform from gps to base_footprint. Error was "gps" passed to lookupTransform argument source_frame does not exist.
[ WARN] [1630648010.634120526]: Could not obtain base_footprint->gps transform. Will not remove offset of navsat device from robot's origin.
The launch and yaml files are:
[fusion.launch]
<launch>
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true" output="screen">
<!-- load yaml file-->
<rosparam command="load" file="$(find robot_localization)/params/sensor_fusion_gps_wheel.yaml" />
<!-- publish topic name -->
<remap from="/odometry/filtered" to="fusion/odom" />
<!-- subscribe odom data (gps) -->
<remap from="odom0" to="/odometry/gps" />
<!-- subscribe Wheel Odometry -->
<remap from="odom1" to="odom" />
</node>
<node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" clear_params="true">
<rosparam command="load" file="$(find robot_localization)/params/navsat_transform_edit.yaml" />
<remap from="/odometry/filtered" to="/odom"/>
<remap from="/gps/fix" to="/fix"/>
</node>
</launch>
[sensor_fusion_gps_wheel.yaml]
frequency: 30
sensor_timeout: 0.05
two_d_mode: true
transform_time_offset: 0.0
transform_timeout: 0.0
print_diagnostics: true
publish_tf: true
publish_acceleration: false
#frame
map_frame: map
odom_frame: odom
base_link_frame: base_footprint
world_frame: odom
#odom0: GPS
odom0: odom0
odom0_config: [true, true, true,
false, false, true,
false, false, false,
false, false, false,
false, false, false]
#odom1: wheel odometry
odom1: odom1
odom1_config: [false, false, false,
false, false, false,
true, false, false,
false, false, true,
false, false, false]
[navsat_transform_edit.yaml]
frequency: 30
delay: 3.0
magnetic_declination_radians: 0.0
yaw_offset: 1.5707963267949
zero_altitude: false
broadcast_cartesian_transform: false
broadcast_cartesian_transform_as_parent_frame: false
publish_filtered_gps: false
use_odometry_yaw: true
wait_for_datum: true
datum: [35.500,139.600,0.0]
APPEND
I add a command:
<node pkg="tf" type="static_transform_publisher" name="map_to_odom" args="0 0 0 0 0 0 map odom 100" />
before " node pkg="robot_localization" ~~ " in fusion.launch.
It seems good because map and odom, which were separated, have a new relationship.
Now, TF tree is like this.(Sorry, I couldn't paste TF graph)
map - gnss
\ odom - base_footprint - base_link
However, a transform failed and another error occurred.
[ WARN] [1631093296.039572793, 1626054059.809818161]: Could not obtain transform from gps to base_link. Error was "gps" passed to lookupTransform argument source_frame does not exist.
Does it mean that different names in TF ...
Sorry, have you got proper TFs set up?
>Ronro
I didn't do anything about TFs. When I checked the TF tree, map and odom(base_footprint, base_link) were separated. Is this the cause? If I connect map and odom before EKF, will the error go away?
I don't know if the error Will disappear but that's how you should have that configured. Please, traje a look at this
>Ronro
Thanks. I tried doing so, but this wasn't the only problem. I append about this.