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

robot_localization navsat transform node does not publish

asked 2019-09-12 12:36:35 -0500

Combinacijus gravatar image

updated 2019-09-21 13:47:20 -0500

Hello,

Goal: Write simplest robot_localization program using Android phone sensors (GPS and IMU). To be more exact first I need navsat_transform_node to output something.

Problem: /odometry/filtered, /odometry/gps and gps/filtered topics won't publish any message.

Info:

  • Ubuntu 18.04, ROS Melodic
  • I'm quite new to ROS. Programming isn't problem for me it's just ROS concepts.
  • I don't have odometry sensors for now but it shouldn't be necessary if I understood documentation well, right?
  • Yes I have read robot_localization documentation and yes I read many answers on answers.ros.org and other places and I have spent a lot of time trying to get ir running but with no success. I might be missing some key concept and I would really appreciate the help.

Setup:

  • I have "ROS Sensors Driver" app on Android which connects to the ROS master on computer via wifi. This part working fine master receives GPS and IMU messages
  • Installed ros_localization package via command: sudo apt-get install ros-melodic-robot-localization
  • Launching nav_sat.launch file for navsat_transform_node (which I assume is the first step for localization with GPS)
  • Attached bag file for GPS and IMU data also link if attachment didn't work https://drive.google.com/open?id=1uaA...

nav_sat.launch:

<launch>
    <node pkg="tf2_ros" type="static_transform_publisher" name="static_tf1" args="0 0 0 0 0 0 base_link imu" />
    <node pkg="tf2_ros" type="static_transform_publisher" name="static_tf2" args="0 0 0 0 0 0 base_link gps" />

  <node pkg="robot_localization" type="navsat_transform_node" name="navsat_transform_node" output="screen">

    <param name="publish_filtered_gps" value="true"/>
    <remap from="/imu/data" to="/android/imu" />
    <remap from="/gps/fix" to="/android/fix" />
    <remap from="/odometry/filtered" to="/odometry/filtered" />
  </node>

  <node pkg="rviz" type="rviz" name="rviz"/>
</launch>

Output: Only output I get is in the terminal window. Also the coordinates are accurate:

[ INFO] [1568201308.195924722]: Datum (latitude, longitude, altitude) is (XX.902596, XX.960813, XX.968323)
[ INFO] [1568201308.196126403]: Datum UTM coordinate is (XXXXXX.819897, XXXXXXX.950294)

As said /odometry/filtered, /odometry/gps and gps/filtered topics won't publish any message.

Messages: /android/imu:

header:
  seq: 581523
  stamp:
    secs: 1568792943
    nsecs:  82000000
  frame_id: "/imu"
orientation:
  x: -0.709161221981
  y: 0.031271263957
  z: -0.681847274303
  w: 0.176625996828
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity:
  x: 0.757553100586
  y: -0.367462158203
  z: -0.454147338867
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration:
  x: 8.11840820312
  y: -7.03816223145
  z: -2.65315246582
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]

/android/fix:

header:
  seq: 580317
  stamp:
    secs: 1568108152
    nsecs: 242000000
  frame_id: "/gps"
status:
  status: 0
  service: 1
latitude: 54.9023711
longitude: 23.96061015
altitude: 108.23223877
position_covariance: [1328.4568397011753, 0.0, 0.0, 0.0, 1328.4568397011753, 0.0, 0.0, 0.0, 1328.4568397011753 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2019-10-15 15:27:40 -0500

ssohin gravatar image

updated 2019-10-15 15:29:18 -0500

You're trying to launch a navsat_transform node without odometry data. The navsat_transofrm node requires three inputs:

  1. GPS data

  2. IMU data

  3. Odometry data

You have the first two and you're not publishing on the third one. If you look at the navsat_transform node documentation found here, you'll notice that the /odometry/filtered topic is remapped to /your/robot_localization/output/topic.

<remap from="/odometry/filtered" to="/your/robot_localization/output/topic" />

In your case, you do not have access to odometry information from your android device(I looked at your bag file). So, you need to use the gps and Imu data with one of the state estimation nodes of the robot_localization package. The output of your state estimation node will give you an odometry, which you can then pass into the navsat_transform node to get your robot localized.

Also see these answers for reference:

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-09-12 12:36:35 -0500

Seen: 2,209 times

Last updated: Oct 15 '19