ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to use robot_localization without IMU topic

asked 2021-09-03 02:21:24 -0500

Awt gravatar image

updated 2021-09-10 03:25:53 -0500

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 ... (more)

edit retag flag offensive close merge delete

Comments

Sorry, have you got proper TFs set up?

Ronro gravatar image Ronro  ( 2021-09-07 16:25:37 -0500 )edit

>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?

Awt gravatar image Awt  ( 2021-09-07 19:53:01 -0500 )edit

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 gravatar image Ronro  ( 2021-09-08 03:59:29 -0500 )edit

>Ronro

Thanks. I tried doing so, but this wasn't the only problem. I append about this.

Awt gravatar image Awt  ( 2021-09-08 04:51:48 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2021-10-21 20:58:16 -0500

Awt gravatar image

After all, there was a problem with how to connect the frames.
I used nmea_navsat_driver without any doubt, but it didn't seem to work properly due to a problem with the settings I did. So, I tried to prevent TF output from nmea_navsat_driver and connect between gnss frame and base_footprint frame by tf static_transform_publisher.(gnss frame is a child.)
It worked to move, but there are some problems. The important problem is the origin coordinates after nav_msgs/Odometry conversion. If the latitude / longitude information and orientation information of the start position are not set in detail in [navsat_transform_edit.yaml] (my case), the coordinate position and direction after conversion will be unintended, so the track will be shown at a position completely different from wheel odometry (and other odometry information). In other words, it means that EKF_node cannot integrate with the position information of wheel odometry.
I wanted to integrate it with other positioning information in my plan, but I'm not sure it will work. If you use this as a reference, we recommend that you install the IMU according to the instructions.

edit flag offensive delete link more

Comments

Hello, have you found a solution for this problem in the meantime? Best Regards, Marcel

MarcArno gravatar image MarcArno  ( 2021-12-06 10:21:50 -0500 )edit

Hello, MarcArno No, I haven't found it. Thank you for your concern.

Awt gravatar image Awt  ( 2021-12-15 03:32:53 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-09-03 02:21:24 -0500

Seen: 395 times

Last updated: Oct 21 '21