rtabmap_drone_example icon indicating copy to clipboard operation
rtabmap_drone_example copied to clipboard

Transform Frame Issue D435

Open samim-17 opened this issue 5 months ago • 6 comments

While following this tutorial, I tried to add d435 camera urdf and added to the existing drone mode. The gazebo.launch is working fine but when I try to launch slam.launch i get the following issue Screenshot from 2024-09-15 23-09-40 My TF tree is: Screenshot from 2024-09-15 23-12-18

and my launch file is:

<arg name="localization" default="false"/>
<arg name="rtabmap_viz"   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_util/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_launch)/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="rtabmap_viz"        value="$(arg rtabmap_viz)" />
  <arg name="frame_id"          value="base_link" />
  <arg name="odom_guess_frame_id" value="base_link_stabilized" />
  <arg name="rgb_topic"         value="/camera/camera/color/image_raw" />
  <arg name="depth_topic"       value="/camera/camera/depth/image_raw" />
  <arg name="camera_info_topic" value="/camera/camera/color/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)" name="ground_truth_base_frame_id" value="base_link_gt"/>
</include>

<!-- Costmap -->
<node pkg="nodelet" type="nodelet" name="camera_points_xyz" args="standalone rtabmap_util/point_cloud_xyz">
  <remap from="depth/image"       to="/camera/camera/depth/image_raw"/>
  <remap from="depth/camera_info" to="/camera/camera/depth/camera_info"/>
  <remap from="cloud"             to="camera_cloud" />

  <param name="decimation"  type="double" value="4"/>
  <param name="voxel_size"  type="double" value="0.0"/>
  <param name="approx_sync" type="bool"   value="true"/>
</node> 

<!-- navigation -->  
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
   <remap from="map" to="/rtabmap/grid_map"/>
   <remap from="odom" to="/rtabmap/odom"/>
   <param name="base_local_planner" value="dwa_local_planner/DWAPlannerROS" />  
   <rosparam file="$(find rtabmap_drone_example)/param/costmap_common_params.yaml" command="load" ns="global_costmap" />
   <rosparam file="$(find rtabmap_drone_example)/param/costmap_common_params.yaml" command="load" ns="local_costmap" />
   <rosparam file="$(find rtabmap_drone_example)/param/global_costmap_params.yaml" command="load" />
   <rosparam file="$(find rtabmap_drone_example)/param/local_costmap_params.yaml" command="load" />
   <rosparam file="$(find rtabmap_drone_example)/param/base_local_planner_params.yaml" command="load" />
</node>
<!-- joystick -->
<rosparam file="$(find rtabmap_drone_example)/config/joy_config.yaml" />
<node pkg="joy" type="joy_node" name="joy_node">
    <param name="autorepeat_rate" value="5"/>
</node>
<node pkg="teleop_twist_joy" type="teleop_node" name="teleop_node" output="screen">
    <param name="autorepeat_rate" value="5"/>
</node>

<!-- Ground truth -->
Please help required !

samim-17 avatar Sep 15 '24 17:09 samim-17