Using GPS & IMU for robot positioning
I'm relatively new to ROS and I'm having trouble trying to integrate all the components for the real Unmanned Surface Vehicle. I have the robot description (which I've been using within Gazebo until now), a driver node for the dual-antenna GNSS, and a LiDAR driver node.
At this time, all I want to do is integrate telemetry from the real GNSS so that I can see the robot move in the map (3D-XYZ and orientation). My understanding is that I should be using the robot_localization
package to fuse the GPS & IMU but I haven't had any luck getting the robot to move. For my current base for robot_localization, I am using the answer from this question.
I can see new messages being produced under the topics /odometry/gps
and /odometry/filtered
but I get a slew of errors and am yet to get the robot to move.
Is there something obvious that I am missing to get the robot to move? I've tried searching the subject but either I'm not finding anything that helps or just not understanding the process.
Source Repo: I've made a stripped-down test version (containing the robot description and launch file that I am using) available in this repo as well as a bag file of some GNSS output under ./cust_robot_description/misc/sample.bag
. (This is from a bench test so the latitude
/longitude
are relatively static but the roll
/pitch
should change to show the robot move)
This can be run using: roslaunch cust_robot_description view.launch
When running, I get the following errors. My understanding was that the odom->cust_robot/base_link
tf was meant to be published by navsat_transform_node
. If I add this transform myself, the error goes away but the robot still does not move in RVIZ.
[ WARN] [1611055719.572462689]: Could not obtain transform from cust_robot/base_link to odom. Error was Could not find a connection between 'odom' and 'cust_robot/base_link' because they are not part of the same tree.Tf has two or more un
connected trees.
[ WARN] [1611055721.572495570]: Could not obtain transform from cust_robot/base_link to odom. Error was Could not find a connection between 'odom' and 'cust_robot/base_link' because they are not part of the same tree.Tf has two or more un
connected trees.
[ WARN] [1611055722.572482436]: Could not obtain odom->cust_robot/base_link transform. Will not remove offset of navsat device from robot's origin.
...
The robot and RVIZ configuration:
<launch>
<arg name="namespace" default=""/>
<arg name="use_gui" default="false"/>
<param name="/use_sim_time" value="false"/>
<param name="robot_description" command="xacro --inorder '$(find cust_robot_description)/robots/cust_robot_default.urdf.xacro'" />
<!-- Publish transform for rotations to world frame -->
<node pkg="tf" type="static_transform_publisher" name="base_link_tf" args="0 0 0 0 0 0 1 map cust_robot/base_link 30"/>
<param name="use_gui" value="$(arg use_gui)"/>
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find ...
Why would robot_localization help your robot move? What do you mean by that? To get the robot to move you should be using something like move_base. Localization will just be used to track its motion right?
Apologies, when I mean "move" I mean to track its real-world motion. The platform will more or less currently just be a suite of sensors that need monitoring/visualised (GPS, IMU, Camer, LiDAR, etc,). Actual control will come much further down the line which I guess what
move_base
is intended for.