0
$\begingroup$

Rosanswers logo

Hi all,

I'm working with this tutorial to simulate an environment and test my sensors set to benchmark localization and navigation algorithms. I can launch the tutorial with my custom world and sensors, that's okay ; but I can't find a way to load a static map in Rviz. I added a node in the launch file, as usual and the error log is the following:

ERROR: cannot launch node of type [map_server/map_server]: map_server
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/tmp/workspace/src
ROS path [2]=/opt/ros/kinetic/share

So here I am checking on my computer on these locations if I have the map_server package. Obviously, as I have already used it before, I found it in

/opt/ros/kinetic/share

However, I know that Docker creates its own container, and loads ROS packages into it. So I fired up a terminal, typed

docker ps -l 

to get the name of the actual docker. Then

docker exec -it <docker_container_name> bash

to open up an interactive console within the container. Then

cd /opt/ros/kinetic/share; ls

And here is the trick : there is no map_server package here. So the node can't be launched. Thus, my question is pretty simple: how can I "pass" the map_server package inside the Docker container, or any other package after that, without using a tremendous number of plugins and tricky command lines?

Thank you very much for your help!

Guillaume


Originally posted by GuillaumeHauss on ROS Answers with karma: 36 on 2017-11-01

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Found it! you need to modify the Dockerfile that create your image. Add this:

# setup sources.list
RUN echo "deb http://packages.ros.org/ros/ubuntu xenial main" > /etc/apt/sources.list.d/ros-latest.list 

# install ros packages
ENV ROS_DISTRO kinetic
RUN apt-get update && apt-get install -y \
   ros-kinetic-map-server \
   ros-kinetic-amcl \
   ros-kinetic-hector-slam \
   <any_ros_package> \
&& rm -rf /var/lib/apt/lists/*    

However, this not solve the issue in case of house-made package. So a better, more flexible solution might still be suitable!


Originally posted by GuillaumeHauss with karma: 36 on 2017-11-01

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.