SteveMacenski / spatio_temporal_voxel_layer

A new voxel layer leveraging modern 3D graphics tools to modernize navigation environmental representations
http://wiki.ros.org/spatio_temporal_voxel_layer
GNU Lesser General Public License v2.1
616 stars 183 forks source link

Can't visualize frustum on ROS2 Humble #282

Closed avanmalleghem closed 6 months ago

avanmalleghem commented 6 months ago

Hello,

I would like to visualize fustum. To do so, I modified the VISUALIZE_FRUSTUM macro and I clearly see using the following code that I enter the "if" statement because of the "print" in my terminal (I see TEST-IN" and TEST-OUT"):

  #if VISUALIZE_FRUSTUM
  std::cout << "TEST - IN" << std::endl;
  _node = std::make_shared<rclcpp::Node>("frustum_publisher");
  _frustum_pub = _node->create_publisher<visualization_msgs::msg::MarkerArray>("frustum", 10);
  rclcpp::sleep_for(std::chrono::milliseconds(500));
  std::cout << "TEST - OUT" << std::endl;
  #endif

Unfortunately, I can't see the node in ros2 node list and I can't see the topic in ros2 topic list (or echo). I tried to call some functions on _node (like count_publishers) and it is working as expected (returns 0 before creation and 1 after [and 1 even just before the publish of the message]).

I'm on commit https://github.com/SteveMacenski/spatio_temporal_voxel_layer/commit/1784847c2b51c30003d49963bea0d635bab112a3

I guess there is some regression because of the dynamic creation of a node in ROS2 Humble ? Do you have some hints to help me ?

avanmalleghem commented 6 months ago

Found it : you can't see frustum if grid is empty ! So put an obstacle on your grid !