Hello,
I’m trying to load a map I made using FUNMAP by running the following command:
roslaunch stretch_funmap mapping.launch map_yaml:="/home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi.yaml"
However, I’m encountering an error. Here’s the error message:
Node funmap received first point cloud, so continuing.
HeadScan.from_file: base_filename = /home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi.yaml
Traceback (most recent call last):
File "/home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/nodes/funmap", line 1386, in <module>
node.main()
File "/home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/nodes/funmap", line 1282, in main
self.merged_map = ma.HeadScan.from_file(self.map_filename)
File "/home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/src/stretch_funmap/mapping.py", line 483, in from_file
with open(base_filename + '.yaml', 'r') as fid:
FileNotFoundError: [Errno 2] No such file or directory: '/home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi.yaml.yaml'
[funmap-11] process has died [pid 10656, exit code 1, cmd /home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/nodes/funmap --load_map /home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi.yaml __name:=funmap __log:=/home/hello-robot/.ros/log/fcb12c6c-0b04-11ee-89d3-414212bcc179/funmap-11.log].
log file: /home/hello-robot/.ros/log/fcb12c6c-0b04-11ee-89d3-414212bcc179/funmap-11*.log
I attempted to remove the .yaml
extension from the command, but it resulted in a different error. Here’s the new error message:
Node funmap received first point cloud, so continuing.
HeadScan.from_file: base_filename = /home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi
data = {'camera_depth_image_filename': '/home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi_camera_depth.png', 'image.dtype': 'uint8', 'image.shape': [2667, 2667], 'image_filename': '/home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi_image.npy.gz', 'image_origin': [0.012, 15.988, 0.0], 'm_per_height_unit': 0.0046456692913385824, 'm_per_pix': 0.006, 'np.max(image)': None, 'rgb_image_filename': '/home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi_rgb.png', 'transform_corrected_to_original': None, 'transform_original_to_corrected': None, 'visualization_filename': '/home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi_visualization.png', 'voi_data': {'axes': [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], 'frame_id': 'map', 'origin': [-8.0, -8.0, -0.05], 'x_in_m': 16.0, 'y_in_m': 16.0, 'z_in_m': 1.18}}
Traceback (most recent call last):
File "/home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/nodes/funmap", line 1386, in <module>
node.main()
File "/home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/nodes/funmap", line 1282, in main
self.merged_map = ma.HeadScan.from_file(self.map_filename)
File "/home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/src/stretch_funmap/mapping.py", line 487, in from_file
max_height_image_base_filename = data['max_height_image_base_filename']
KeyError: 'max_height_image_base_filename'
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 86.501897 above maximum frequency of 80.00 Hz. Motor commands dropped: 2
[funmap-11] process has died [pid 11482, exit code 1, cmd /home/hello-robot/catkin_ws/src/stretch_ros/stretch_funmap/nodes/funmap --load_map /home/hello-robot/stretch_user/debug/merged_maps/merged_map_20230614163431_mhi __name:=funmap __log:=/home/hello-robot/.ros/log/dd4ef420-0b05-11ee-89d3-414212bcc179/funmap-11.log].
log file: /home/hello-robot/.ros/log/dd4ef420-0b05-11ee-89d3-414212bcc179/funmap-11*.log
I also tried using the following command, but I faced the same errors:
$ roslaunch stretch_funmap mapping.launch map_yaml:=$HELLO_FLEET_PATH/debug/merged_maps/<insert_map_filename>.yaml
Can anyone provide insights or suggestions on how to resolve this issue? I am using a Stretch 2 robot.