how do i connect mavros to move_base? how to correct disconnected tf trees?
I am trying to recreate this project but with a real drone. https://github.com/matlabbe/rtabmap_d... I'm using a orange cube flight controller (mavros), oak-d stereo camera, and A1RpLidar. on noetic ubuntu 20.04
I have had all the elements working separately. Right now i have 2 problems. but im sure there are more.
Here i have no idea what im doing as a whole picture.
[ WARN] [1672964833.982613712]: odometry: Could not get transform from base_link to oak_right_camera_optical_frame (stamp=1672964833.653390) after 0.200000 seconds ("wait_for_transform_duration"=0.200000)! Error="Could not find a connection between 'base_link' and 'oak_right_camera_optical_frame' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.200662 timeout was 0.2."
I have had this part working independently of this launch file so i dont know why this isnt working.
[ WARN] [1672964834.084149753]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10).
/rtabmap/rtabmap subscribed to (approx sync):
/rtabmap/odom \
/stereo_inertial_publisher/right/image_rect \
/stereo_inertial_publisher/stereo/depth \
/stereo_inertial_publisher/right/camera_info \
/rtabmap/odom_info
Here is a copy of my launch file
<?xml version="1.0"?>
<launch>
<arg name="localization" default="false"/>
<arg name="rtabmapviz" default="true"/>
<arg name="ground_truth" default="false"/>
<arg if="$(arg localization)" name="pre_args" default=""/>
<arg unless="$(arg localization)" name="pre_args" default="-d"/>
<node pkg="nodelet" type="nodelet" name="imu_to_tf" args="standalone rtabmap_ros/imu_to_tf">
<remap from="imu/data" to="/mavros/imu/data"/>
<param name="fixed_frame_id" value="base_link_stabilized"/>
<param name="base_frame_id" value="base_link"/>
</node>
<!-- To connect rtabmap planning stuff with move_base below -->
<param name="/rtabmap/rtabmap/use_action_for_goal" value="true"/>
<remap from="/rtabmap/move_base" to="/move_base"/>
<!-- VSLAM -->
<param name="/rtabmap/rtabmap/latch" value="false"/> <!-- For some reason, if we latch grid_map, the global costmap inflation layer will create holes on robot path. To avoid holes, republish grid_map on each update (latching disabled). -->
<include file="$(find rtabmap_ros)/launch/rtabmap.launch">
<arg name="localization" value="$(arg localization)"/>
<arg name="args" value="$(arg pre_args) --Optimizer/GravitySigma 0.1 --Vis/FeatureType 10 --Kp/DetectorStrategy 10 --Grid/MapFrameProjection true --NormalsSegmentation false --Grid/MaxGroundHeight 1 --Grid/MaxObstacleHeight 1.6 --RGBD/StartAtOrigin true" />
<arg name="rtabmapviz" value="$(arg rtabmapviz)" />
<arg name="frame_id" value="base_link" />
<arg name="odom_guess_frame_id" value="base_link_stabilized" />
<arg name="rgb_topic" value="/stereo_inertial_publisher/right/image_rect" />
<arg name="depth_topic" value="/stereo_inertial_publisher/stereo/depth" />
<arg name="camera_info_topic" value="/stereo_inertial_publisher/right/camera_info" />
<arg name="imu_topic" value="/mavros/imu/data"/>
<arg name="wait_imu_to_init" value="true"/>
<arg name="approx_sync" value="true"/>
<arg if="$(arg ground_truth)" name="ground_truth_frame_id" value="world"/>
<arg if="$(arg ground_truth ...