3D esdf for path planning - Nvblox

Hi

Im using nvblox on a drone in Isaac sim. I have nvblox up and running in a docker enviroment. It makes a nice TSDF reconstruction. I would like to use the ESDF for path planning, but both of the following topics are empty:

  • /nvblox_node/static_esdf_pointcloud
  • /nvblox_node/pessimistic_static_esdf_pointcloud

I have also tried using the service /nvblox_node/get_esdf_and_gradient alone but also with cumotion’s isaac_ros_esdf_visualizer without any results.

Any suggestions?

Best regards
Kasper

1 Like

Hi @kaspermh

Thank you for your post.

I have some questions:

  • Are you using our Docker container?
  • Did you set up theupdate_esdf_rate_hz with a positive value?
  • Did you set publish_esdf_distance_slice to true?

Best,
Raffaello

Hi Raffaello,

Im using the docker, as suggested by the instalation-manual.

Both parameters is set correcly. In esdf_mode: “2D” I get an output on the topic’s, but not in “3D” mode.

Looking in the source code, i notice that it only publishes in 2D mode?

void NvbloxNode::processEsdf()
{
  const rclcpp::Time timestamp = get_clock()->now();
  timing::Timer ros_esdf_timer("ros/esdf");
  timing::Rates::tick("ros/update_esdf");

  timing::Timer esdf_integration_timer("ros/esdf/integrate");
  multi_mapper_->updateEsdf();
  if (newest_integrated_depth_time_ > rclcpp::Time(0, 0, RCL_ROS_TIME)) {
    timing::Delays::tick(
      "ros/esdf_integration",
      nvblox::Time(newest_integrated_depth_time_.nanoseconds()),
      nvblox::Time(now().nanoseconds()));
  }
  esdf_integration_timer.Stop();

  if (params_.esdf_mode == EsdfMode::k2D) {
    timing::Timer esdf_output_timer("ros/esdf/slice_output");

    sliceAndPublishEsdf(
      "static", static_mapper_, static_esdf_pointcloud_publisher_,
      static_map_slice_publisher_, static_occupancy_grid_publisher_,
      params_.distance_map_unknown_value_optimistic);

    if (isUsingHumanOrDynamicMapper(params_.mapping_type)) {
      sliceAndPublishEsdf(
        "dynamic", dynamic_mapper_, dynamic_esdf_pointcloud_publisher_,
        dynamic_map_slice_publisher_, dynamic_occupancy_grid_publisher_,
        params_.distance_map_unknown_value_optimistic);
      sliceAndPublishEsdf(
        "combined_dynamic", static_mapper_, combined_esdf_pointcloud_publisher_,
        combined_map_slice_publisher_, combined_occupancy_grid_publisher_,
        params_.distance_map_unknown_value_optimistic, dynamic_mapper_.get());
    }

    if (params_.output_pessimistic_distance_map) {
      sliceAndPublishEsdf(
        "pessimistic_static", static_mapper_,
        pessimistic_static_esdf_pointcloud_publisher_,
        pessimistic_static_map_slice_publisher_, nullptr,
        params_.distance_map_unknown_value_pessimistic);
    }
  }
}

Hi @Raffaello , I am facing the exact same issue. The esdf point clouds are empty when esdf mode is set to 3D.
Would be very grateful for help as I think this is the bottle neck preventing me from progressing in my project. Thanks.

@kaspermh Did you manage to solve this issue?

Hey @rngujarathi

I didnt mangage to solve the problem…

I ended up using the 2d slice, where i made it follow the z-axis of base_link.

What is your project regarding?

Hi @kaspermh ,

I am also running nvblox on a jetson mounted on a drone. I want to use it for path planning in 3D hence interested in the 3D esdf. The tsdf layer is always available so I thought of using that but the msg structure is not a pointcloud so the actual tsdf distance is not published so I don’t know where to get that from (but this is a separate issue).

I am worried that using the 2D slice will not give the most optimal path in 3D… I am rechecking the esdf related parameters and console outputs and trying to understand the nvblox_node.cpp script. Maybe something will work out. Will keep you updated here.

Would be great is someone from the forum can help with this!

Hi @rngujarathi

I know 2d isnt optimal, but it’a a start to test some other parts of your algorithms.

This is my repo for simulation:

This will be updated during the 2nd half of 2025

Please let me know if you find a better solution

Hey @kaspermh,

Yes you are right. Thanks for your repo! Will start with the 2D slice to test basic path planning and the entire pipeline.

Reading the source code hasn’t helped with ideas on how to modify nvblox to work in 3D esdf mode. Hope nvidia will fix that (@Raffaello). I am wondering if it’s worth forgoing nvblox completely and working directly with the raw point cloud output by isaac ros vslam. There are python libraries that can do the 3D reconstruction. But of course, then it’s doing everything from scratch.

Will keep you updated and requesting the same if you make a breakthrough.

Hi @kaspermh! Please correct me if I am wrong. I think if you need the esdf grid data while on the 3d mode we must use the ‘get_esdf_and gradient’ service rather than subscribing to the pointcloud topic. So will creating a client for that service and querying the grid data from it solve your issue? I hope this helps!