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