ntnu-arl / gbplanner_ros

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

Which node subscribe the “/input_pointcloud”? #15

Closed TurtleZhong closed 2 years ago

TurtleZhong commented 2 years ago

Hi @tungdanganh @MihirDharmadhikari , Thank you very much for your work. I've read both your papers and the youtube video detailing the entire exploration algorithm. When I try your released code, in the ground robot sim demo, I found this in smb_sim.launch <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>

I can't find the subscriber of /point_cloud in gbplanner.cpp or rrg.cpp, but when I use rostopic node info /gbplanner_node I got this:

Node [/gbplanner_node] Publications:

Subscriptions:

which means the gbplaner_node subscribe the /input_pointcloud. and I only found in the [/maping/voxblox/voxblox_ros/src/tsdf_server.cc], the node subscribe the pointcloud. So I am confused about the gbplanner node only contains

MihirDharmadhikari commented 2 years ago

Hi @TurtleZhong ,

Thank you for the question. The pointcloud is only used to generate the voxblox map. Hence, only the voxblox server subscribes to it. Since the voxblox server runs inside the gbplanner_node, rosnode info shows that gbplanner_node is subscribing to the pointcloud. Gbplanner does not use the pointcloud directly but only uses the map generated by voxblox. Hence, none of the files inside gbplanner have the subscriber to the pointcloud.

I hope this helps.

Best, Mihir

TurtleZhong commented 2 years ago

Hi @TurtleZhong ,

Thank you for the question. The pointcloud is only used to generate the voxblox map. Hence, only the voxblox server subscribes to it. Since the voxblox server runs inside the gbplanner_node, rosnode info shows that gbplanner_node is subscribing to the pointcloud. Gbplanner does not use the pointcloud directly but only uses the map generated by voxblox. Hence, none of the files inside gbplanner have the subscriber to the pointcloud.

I hope this helps.

Best, Mihir

Thank you very much, I found that in rrg.cpp

Rrg::Rrg(const ros::NodeHandle& nh, const ros::NodeHandle& nh_private) : nh_(nh), nh_private_(nh_private) { map_manager_ = new MapManagerVoxblox<MapManagerVoxbloxServer, MapManagerVoxbloxVoxel>( nh_, nh_private_);

adaptive_obb_ = new AdaptiveObb(map_manager_);

initializeAttributes(); }

The map_manager_ is the entry of voxblox, am I right?

Best, Xinliang

MihirDharmadhikari commented 2 years ago

Hi Xinliang,

The map_manager_ is a wrapper around the voxblox APIs. The voxblox server is created here and GBPlanner accesses it through the map_manager_. I hope this helps.

Best, Mihir

TurtleZhong commented 2 years ago

@MihirDharmadhikari Thanks, I will read the codes carefully.:smile: