ntnu-arl / gbplanner_ros

Graph-based Exploration Planner for Subterranean Environments
BSD 3-Clause "New" or "Revised" License
648 stars 147 forks source link

I connected my custom simulation drone to a planner to generate a TSDF point cloud, but it is created slightly differently. #44

Closed romaster93 closed 4 months ago

romaster93 commented 5 months ago

hi.

First, I was very impressed by your excellent planner. Thank you for your research.

I have modified the provided file to update odometry and point cloud data, and I have also adjusted the world tf. Below is the launch file.


<launch>
  <!-- All settings -->
  <arg name="robot_name" default="rmf_obelix"/>
  <arg name="gazebo_gui_en" default="false"/>
  <arg name="use_sim_time" default="true"/>
  <arg name="rviz_en" default="true" />
  <arg name="launch_prefix" default=""/> <!-- gdb -ex run //args -->
  <param name="use_sim_time" value="$(arg use_sim_time)"/>

  <!-- Config files -->
  <arg name="gbplanner_config_file" default="$(find gbplanner)/config/$(arg robot_name)/gbplanner_config.yaml"/>
  <arg name="pci_file" default="$(find gbplanner)/config/$(arg robot_name)/planner_control_interface_sim_config.yaml"/>
  <arg name="voxblox_config_file" default="$(find gbplanner)/config/$(arg robot_name)/voxblox_sim_config.yaml"/>
  <arg name="map_config_file" default="$(arg voxblox_config_file)"/>
  <!-- <arg name="world_file" default="$(find planner_gazebo_sim)/worlds/darpa_cave_01.world"/> -->
  <!--<arg name="world_file" default="$(find planner_gazebo_sim)/worlds/darpa_subt_final_circuit.world"/>-->

  <!-- Static TF -->
  <node pkg="tf" type="static_transform_publisher" name="tf_fastlio2" args="0 0 0 0 0 0 camera_init world 1" />

  <node pkg="topic_tools" type="relay" name="mid360_relay" args="/cloud_registered /input_pointcloud"/>

  <arg name="odometry_topic" default="/Odometry"/>

  <!-- Graph based planning -->
  <node pkg="gbplanner" type="gbplanner_node" name="gbplanner_node" output="screen" launch-prefix="$(arg launch_prefix)">
    <remap from="odometry" to="$(arg odometry_topic)" />
    <remap from="/pointcloud" to="/input_pointcloud" />
    <rosparam command="load" file="$(arg gbplanner_config_file)" />
    <rosparam command="load" file="$(arg map_config_file)" />
  </node>

  <!-- Planner and Control Interface -->
  <node pkg="pci_general" type="pci_general_ros_node" name="pci_general_ros_node" output="screen">
    <remap from="command/trajectory" to="$(arg robot_name)/command/trajectory" />
    <remap from="planner_server" to="gbplanner" />
    <remap from="planner_homing_server" to="gbplanner/homing" />
    <remap from="odometry" to="$(arg odometry_topic)"/>
    <rosparam command="load" file="$(arg pci_file)" />
  </node>

  <node pkg="rviz" type="rviz" name="gbplanner_ui" output="screen" args="-d $(find gbplanner)/config/rviz/rmf_obelix.rviz"/>

</launch>

Everything seemed to be working well, but I found that some TSDF point clouds were not being generated.

my tsdf pointcloud fastlio2

original gbplanner rmf gt

It seems that the TSDF between the outer wall and the drone is not being generated when the drone exits from within the wall. It appears to consistently generate point clouds only from the origin.

In my opinion, I believe that TSDF should be generated from the sensor center in the world frame, but it seems to be generated from the origin in the world frame.

As a result, in complex environments, when the drone moves behind obstacles, some TSDF is not generated, leading to suboptimal exploration paths

What do you think could be the issue? I would appreciate any assistance or insights.

Thanks!

MihirDharmadhikari commented 5 months ago

Hi @romaster93 ,

It seems to me that the point cloud that you are providing to the planner is in the world frame and not in the sensor frame. The way voxblox works is that it expects the point cloud to be in the sensor frame and integrates it from the origin of the point cloud (i.e. the sensor frame origin). Check if this is the case.

Best, Mihir

romaster93 commented 4 months ago

@MihirDharmadhikari

Thansk! its works!!