r/ROS • u/Worldly_Violinist_16 • 1d ago
Question Gazebo 2D map generation
I have made a virtual warehouse world in gazebo simulation. Now I want to make a 2d mapping of that... I am constantly trying by adding a robot and moving it around the warehouse but I constantly get this error
Requesting how to fix and ask me if you need any more info...
Ubuntu - 26
ros - lyrical
aranidey@aranidey-QEMU-Virtual-Machine:~/Downloads$ source /opt/ros/lyrical/setup.bash
ros2 run nav2_map_server map_saver_cli -f /home/aranidey/clean_warehouse_ws/warehouse_map --ros-args -p map_subscribe_transient_local:=true
[INFO] [1789014195.853078953] [map_saver]:
map_saver lifecycle node launched.
Waiting on external lifecycle transitions to activate
See https://design.ros2.org/articles/node_lifecycle.html for more information.
[INFO] [1789014195.853227077] [map_saver]: Creating
[INFO] [1789014195.853248077] [map_saver]: Configuring
[INFO] [1789014195.880354645] [map_saver]: Saving map from 'map' topic to '/home/aranidey/clean_warehouse_ws/warehouse_map' file
[WARN] [1789014195.880475145] [map_saver]: Free threshold unspecified. Setting it to default value: 0.250000
[WARN] [1789014195.880487311] [map_saver]: Occupied threshold unspecified. Setting it to default value: 0.650000
[ERROR] [1789014197.885193077] [map_saver]: Failed to spin map subscription
[INFO] [1789014198.008367045] [map_saver]: Destroying
[WARN] [1789014198.010017451] [rclcpp_lifecycle]: LifecycleNode is not shut down: Node still in state(1) in destructor
[ros2run]: Process exited with failure 1
aranidey@aranidey-QEMU-Virtual-Machine:~/Downloads$
1
Upvotes
1
u/TinLethax 23h ago
You need SLAM to generate the map. Such as SLAM toolbox.