Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

robot_localization navsat transform node does not publish

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=1uaASJ0-dRxIXZ3owNQBuTUYswiydK9GF

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]
position_covariance_type: 1

/imu (same as /android/imu just with added arbitrary variances):

header:
  seq: 34044
  stamp:
    secs: 1568792961
    nsecs: 936000000
  frame_id: "/imu"
orientation:
  x: 0.0374677367508
  y: -0.213686034083
  z: 0.611133694649
  w: 0.761216163635
orientation_covariance: [21.0, 0.0, 0.0, 0.0, 21.0, 0.0, 0.0, 0.0, 21.0]
angular_velocity:
  x: -0.740219116211
  y: 1.10260009766
  z: -3.50825500488
angular_velocity_covariance: [21.0, 0.0, 0.0, 0.0, 21.0, 0.0, 0.0, 0.0, 21.0]
linear_acceleration:
  x: -6.48143005371
  y: -10.2990722656
  z: 10.7974700928
linear_acceleration_covariance: [21.0, 0.0, 0.0, 0.0, 21.0, 0.0, 0.0, 0.0, 21.0]

Final remarks:

  • There might be problem with covariance matrix on /imu it's totally arbitrary but by adding those covariances nothing happened. Maybe it's too small?
  • Maybe I'm missing some frame or something
  • Maybe navsat_transform_node needs some kind of odometry message
  • If any information is missing I'll update it

robot_localization package documentation is poor (for beginners) and tutorials don't address this problem so after trying for quite some time I'm clueless how to implement it. Probably I am missing something really obvious. And please just don't refer to the documentation because I have read it already.

Any help or tips is appreciated, thanks.

robot_localization navsat transform node does not publish

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=1uaASJ0-dRxIXZ3owNQBuTUYswiydK9GF

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]
position_covariance_type: 1

/imu (same as /android/imu just with added arbitrary variances):

header:
  seq: 34044
  stamp:
    secs: 1568792961
    nsecs: 936000000
  frame_id: "/imu"
orientation:
  x: 0.0374677367508
  y: -0.213686034083
  z: 0.611133694649
  w: 0.761216163635
orientation_covariance: [21.0, 0.0, 0.0, 0.0, 21.0, 0.0, 0.0, 0.0, 21.0]
angular_velocity:
  x: -0.740219116211
  y: 1.10260009766
  z: -3.50825500488
angular_velocity_covariance: [21.0, 0.0, 0.0, 0.0, 21.0, 0.0, 0.0, 0.0, 21.0]
linear_acceleration:
  x: -6.48143005371
  y: -10.2990722656
  z: 10.7974700928
linear_acceleration_covariance: [21.0, 0.0, 0.0, 0.0, 21.0, 0.0, 0.0, 0.0, 21.0]

Final remarks:

  • There might be problem with covariance matrix on /imu it's totally arbitrary but by adding those covariances nothing happened. Maybe it's too small?
  • Maybe I'm missing some frame or something
  • Maybe navsat_transform_node needs some kind of odometry message
  • If any information is missing I'll update it

robot_localization package documentation is poor (for beginners) and tutorials don't address this problem so after trying for quite some time I'm clueless how to implement it. Probably I am missing something really obvious. And please just don't refer to the documentation because I have read it already.

Any help or tips is appreciated, thanks.