hello-robot / stretch_ros2

ROS 2 packages for the Stretch mobile manipulators from Hello Robot Inc.
https://docs.hello-robot.com/0.2/stretch-tutorials/ros2/
51 stars 19 forks source link

Undefined variables in FUNMAP #93

Open benoit-robotics opened 6 months ago

benoit-robotics commented 6 months ago

Two variables are used but are not initialized anywhere in the code, which lead to the funmap node to crash. Tested on ROS 2 Humble. https://github.com/hello-robot/stretch_ros2/blob/humble/stretch_funmap/stretch_funmap/funmap.py#L1387C14-L1388C32

hello-binit commented 6 months ago

Hi @benoit-robotics, thanks for reporting the issue. Could you try the fix in the feature/funmap_rebase branch? This should resolve the problem by defining those thread variables.

benoit-robotics commented 6 months ago

Hi. I tried out this branch but it doesn't work for me. First, the stretch_funmap package contains a COLCON_IGNORE file ( it's not a good sign ! ) which needs to be removed. Secondly, the funmap node crashes when I start a headscan :

[funmap-8] File "/home/care-homes/ament_ws/install/stretch_funmap/lib/python3.10/site-packages/stretch_funmap/funmap.py", line 946, in perform_head_scan [funmap-8] head_scan.execute_full(node, fast_scan=fast_scan) [funmap-8] File "/home/care-homes/ament_ws/install/stretch_funmap/lib/python3.10/site-packages/stretch_funmap/mapping.py", line 424, in execute_full [funmap-8] self.execute(head_tilt, far_left_pan, far_right_pan, num_pan_steps, capture_params, node) [funmap-8] File "/home/care-homes/ament_ws/install/stretch_funmap/lib/python3.10/site-packages/stretch_funmap/mapping.py", line 372, in execute [funmap-8] self.capture_point_clouds(node, pose, capture_params) [funmap-8] File "/home/care-homes/ament_ws/install/stretch_funmap/lib/python3.10/site-packages/stretch_funmap/mapping.py", line 344, in capture_point_clouds [funmap-8] cloud_time = node.point_cloud.header.stamp [funmap-8] AttributeError: 'NoneType' object has no attribute 'header'