sikang / mpl_ros

A ROS wrapper for trajectory planning based on motion primitives
Apache License 2.0
588 stars 150 forks source link

Unable to open a custom map #24

Open mw9385 opened 2 years ago

mw9385 commented 2 years ago

Hi @sikang, thanks for providing this wonderful project. By following your instructions in the map making sections, I could record the voxel_map topic through the launch file. However, when I tried to implement my custom model in ellipsoid_planner_node, the custom map didn't show up by showing the following error message.

[ WARN] [1657181193.172610214]: Fail to find '/cloud' in '/root/catkin_ws/src/mpl_ros/mpl_test_node/maps/building/aa.bag', make sure md5sum are equivalent.
[test_primitive-1] process has died [pid 4277, exit code -11, cmd /root/catkin_ws/devel/lib/mpl_test_node/ellipsoid_planner_node ~pose:=/move_base_simple/goal __name:=test_primitive __log:=/root/.ros/log/8e369782-fdcb-11ec-9e19-88366cf6d71f/test_primitive-1.log].
log file: /root/.ros/log/8e369782-fdcb-11ec-9e19-88366cf6d71f/test_primitive-1*.log

I thought it was caused by the topic cloud is not recorded because rosbag record /voxel_map only records /voxel_map topic. I assumed that rviz shows map only through pointcloud data not voxel map. I have tried with many times and knew that if the bag file doesn't contain cloud topic, then the above error message will come out. So, I recorded all the topics through the command rosbag record -a and it removes the issue.

https://github.com/sikang/mpl_ros/blob/011c1ae3a47fe08c497821e45c2aabc44ddda9d7/mpl_test_node/launch/ellipsoid_planner_node/test.launch#L17

I want to implement your algorithm in custom built environments (gazebo world). Are there any easier way to get custom map in .stl format in Gazebo? If is not, is there any way I could open my custom map with voxel map topic?

Many thanks.