[map_server in Noetic]I want to display images on rviz.
I have recently started learning ROS and would appreciate any pointers as to what I may be doing wrong.
[I want to do]
I want to make the robot move autonomously by taking a map out of google map around the current location and treating it as a global costmap.
[I did]
I could create a global costmap with map_server and paste it on rviz. However, the global costmap I created is a black and white image file, and I feel it is very difficult to see.
So I would like to display the original color map on top of the black and white image that I made into a global costmap.
However, when I look up the image display in rviz, I can only find the realsense display method. How can I do just display the image on rviz?
Also, I am following these steps to output a global costmap on rviz. how do I put it together as a launch file?
terminal 1
$ roscore
terminal 2
$ cd catkin_ws/src/navigation/map_server/test/
$ rosrun map_server map_server testmap.yaml
terminal 3
$ rviz
I found this launch file in a question that another person was asking.
<launch>
<arg name="map_file" default="$(find map_server)/testmap.yaml"/>
<!-- Run the map server -->
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
</launch>
However, when I start it, I get the following Error.
[ERROR] [1666345202.480212495]: Map_server could not open /home/aaaa/catkin_ws/src/navigation/map_server/testmap.yaml.
[map_server-1] process has died [pid 5484, exit code 255, cmd /home/aaaa/catkin_ws/devel/lib/map_server/map_server /home/aaaa/catkin_ws/src/navigation/map_server/testmap.yaml __name:=map_server __log:=/home/aaaa/.ros/log/fad6ddc4-5123-11ed-a45d-d3b5005eb4d7/map_server-1.log].
log file: /home/aaaa/.ros/log/fad6ddc4-5123-11ed-a45d-d3b5005eb4d7/map_server-1*.log
Sorry for the two questions.
I have no idea what is causing this. I hope someone can tell me what is going on.
Thank you.