Comments (5)
Could you please try again with the latest Isaac ROS DP3 Release?
from isaac_ros_nvblox.
Interesting! It's possible you've found a bug.
Could you upload a video showing the effect so I can try to repro? 😃
from isaac_ros_nvblox.
I've written a simple example that shows how I convert between a standard nav_msg OccupancyGrid and the nvblox DistanceMapSlice so you can test it quickly.
// CostMap color palattes: http://docs.ros.org/en/jade/api/rviz/html/c++/map__display_8cpp_source.html
constexpr int8_t kNoInformation = 0;
constexpr int8_t kFreeSpace = 1;
constexpr int8_t kMinCost = 2;
constexpr int8_t kMaxCost = 98;
constexpr int8_t kInscribedInflatedObstacle = 99;
constexpr int8_t kLethalObstacle = 100;
ObstacleMapping::ObstacleMapping() : Node("obstacle_mapping") {
RCLCPP_INFO(this->get_logger(), "Launching Obstacle Mapping Node!");
occupancy_inflation_distance_ = declare_parameter<float>("occupancy_inflation_distance_m", occupancy_inflation_distance_);
occupancy_max_distance_ = declare_parameter<float>("occupancy_max_distance_m", occupancy_max_distance_);
// Publishers
pub_obstacle_map_ = this->create_publisher<nav_msgs::msg::OccupancyGrid>("~/occupancy_grid", rclcpp::SensorDataQoS());
// Subscribers
sub_distance_map_slice_ = this->create_subscription<nvblox_msgs::msg::DistanceMapSlice>("/nvblox_node/map_slice", rclcpp::SensorDataQoS(),
std::bind(&ObstacleMapping::DistanceMapSliceCallback, this, std::placeholders::_1));
}
void ObstacleMapping::DistanceMapSliceCallback(const nvblox_msgs::msg::DistanceMapSlice::ConstSharedPtr& msg) {
// Create occupancy map from nvblox slice
nav_msgs::msg::OccupancyGrid::UniquePtr occupancy_grid = std::make_unique<nav_msgs::msg::OccupancyGrid>();
occupancy_grid->header.frame_id = msg->header.frame_id;
occupancy_grid->header.stamp = msg->header.stamp;
// Copy map dimensions
occupancy_grid->info.origin.position = msg->origin;
occupancy_grid->info.resolution = msg->resolution;
occupancy_grid->info.width = msg->width;
occupancy_grid->info.height = msg->height;
// Allocate the occupancy grid
size_t map_size = msg->width * msg->height;
occupancy_grid->data.resize(map_size, kNoInformation);
// Remap the floating point distance to occupancy grid colors
const auto k_unknown_value = msg->unknown_value;
for (size_t i = 0; i < map_size; ++i) {
// Default: No information
if (msg->data[i] == k_unknown_value) {
continue;
}
// Lethal obstacle
if (msg->data[i] <= 0.0F) {
occupancy_grid->data[i] = kLethalObstacle;
continue;
}
// Inflated obstacle
if (msg->data[i] <= occupancy_inflation_distance_) {
occupancy_grid->data[i] = kInscribedInflatedObstacle;
continue;
}
// Free space
if (msg->data[i] > occupancy_max_distance_) {
occupancy_grid->data[i] = kFreeSpace;
continue;
}
// Distance scale
occupancy_grid->data[i] = kMinCost + static_cast<int8_t>((kMaxCost - kMinCost) * (1.0F - std::min((msg->data[i] - occupancy_inflation_distance_) / occupancy_max_distance_, 1.0F)));
}
pub_obstacle_map_->publish(std::move(occupancy_grid));
}
The video below should highlight the issue. The point cloud distance slice is shown with the point tiles and the underlying distance map is the OccupancyGrid msg slice. The point cloud distance slice seems completely static, but the other map jumps a bit around. The maps are also not completely aligned, which is likely also related to this same issue.
example.1.webm
from isaac_ros_nvblox.
The jump is no longer present in the new release :)
from isaac_ros_nvblox.
@Veng97 Thank you for your help in finding this. much appreciated 👍
from isaac_ros_nvblox.
Related Issues (20)
- What is the car used in this demo? HOT 2
- `Failed to call git rev-parse` and `Failed to build base image: isaac_ros_dev-x86_64, aborting.` HOT 2
- Occupancy grid not cleared if map_clearing_radius_m > 0 and use_static_occupancy_layer: true HOT 3
- Cannot see any result from example HOT 1
- No result from Realsense live data HOT 1
- realsense_splitter_node fails to load on Jetson Xavier NX HOT 2
- How could the robot localize after loading a saved map? HOT 3
- ToF camera integration with Nvblox HOT 8
- Publishing full TSDF/ESDF maps HOT 3
- Caught exception in launch (see debug for traceback): __init__() got an unexpected keyword argument 'condition' HOT 3
- No colored mesh and costmap output HOT 1
- isaac sim example crashes HOT 3
- Realsense Firmware for vslam and nvblox HOT 2
- colcon build --symlink-install failed, missing vpi config file (inside docker) HOT 1
- Why save_map service just give me a flat esdf file? HOT 1
- Process dies after /nvblox_node/save_ply service call HOT 1
- container condition & mapping HOT 1
- What's the realistic maximum size this can run on an Orin? HOT 8
- Visualize nav2 costmaps HOT 1
- colcon build --symlink-install failed (Native Installation Ros2) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from isaac_ros_nvblox.