Open ccy89 opened 4 years ago
@ccy89 are you using rmw_fastrtps_cpp
?
@wjwwood Yes, I use rmw_fastrtps_cpp as RMW implementation. I also test rmw_opensplice_cpp, the result is same.
@clalancette can you triage this issue by figuring out whether or not this is a general performance issue or an implementation issue with the occupancy_grid_node
? Given that it is using so much CPU, is it possible it's spending too much time in the user code rather than the middleware?
Friendly ping @clalancette.
So I took a brief look at this. I wasn't able to get the whole thing actually launching; it starts to launch, but then I just get:
[occupancy_grid_node-3] [WARN] [occupancy_grid_node]: submap_slices and last_frame_id is empty
forever.
Regardless, the occupancy_grid_node
is the part of this that is the newest to the port. I suspect that @ccy89 is right in that it eventually takes up too much CPU time, and thus can't publish anymore. That is likely a problem specific to the occupancy_grid_node
, but I don't know that for certain.
I will not have time to look into it in the near future, so the only things I can do are to:
@clalancette Did you play the ros bag file? I converted google's ros1 bag file into the ros2 bag : https://drive.google.com/open?id=1LIxd9o8QAm-FjViOUolyn2icqlJkwCqB
I use ros2-dashing and cartographer_ros-dashing to test google's demo_backpack_2d.launch. At the beginning, the map can update Immediately. After a while, the submap is large, the map can not update Immediately, the Occupancy grid Node still publish "/map" topic. But the /map topic's time stamp never changes. It means the subscriber don't work.
I notice that when Occupancy grid Node use 100% CPU, this phenomenon will happen
In ROS1, don't have this problem.
I test this in my computer, which has i7-6820HQ CPU. My launch file, configuration file and CMakeLists file is in https://github.com/ccy89/cartographer_ros.git