Docker container acutronicrobotics/gym-gazebo2 installed, what to do next?

asked 2020-12-20 13:34:52 -0500

duttonide gravatar image

updated 2020-12-20 13:39:07 -0500

Hello, I am new to docker

I have installed the docker container by a pull request from https://hub.docker.com/r/acutronicrob.... It got installed correctly as shown below:

duttonide@ubuntu:~$ docker images
REPOSITORY                      TAG                 IMAGE ID            CREATED             SIZE
<none>                          <none>              5415654e5aef        12 hours ago        63.3MB
ubuntu                          bionic              2c047404e52d        3 weeks ago         63.3MB
hello-world                     latest              bf756fb1ae65        11 months ago       13.3kB
acutronicrobotics/gym-gazebo2   latest              b5ccf2feaca5        18 months ago       3.82GB

When I run the docker I get the following errors:

duttonide@ubuntu:~$ docker run -it acutronicrobotics/gym-gazebo2 
root@b47af471b8bf:~/gym-gazebo2# cd ~/ros2learn/experiments/examples/MARA
bash: cd: /root/ros2learn/experiments/examples/MARA: No such file or directory
root@b47af471b8bf:~/gym-gazebo2# python3 train_ppo2_mlp.py
python3: can't open file 'train_ppo2_mlp.py': [Errno 2] No such file or directory
root@b47af471b8bf:~/gym-gazebo2# exit
exit

The official github repo that shows the docker file installation here: https://github.com/AcutronicRobotics/... is quite different.

On trying to install it from here, on running the following code:

cd ~ && git clone -b dashing https://github.com/AcutronicRobotics/ros2learn
cd ~/ros2learn/docker
docker build -t r2l .

I got the following errors:

[0.192s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path 
'home/ros2_example_ws/install/examples_rclcpp_minimal_action_client' in the environment variable 
CMAKE_PREFIX_PATH doesn't exist
--- stderr: composition                         
CMake Error at CMakeLists.txt:133 (find_package):
By not providing "Findlaunch_testing_ament_cmake.cmake" in
CMAKE_MODULE_PATH this project has asked CMake to find a package
configuration file provided by "launch_testing_ament_cmake", but CMake did
not find one.

Could not find a package configuration file provided by
"launch_testing_ament_cmake" with any of the following names:

   launch_testing_ament_cmakeConfig.cmake
   launch_testing_ament_cmake-config.cmake

 Add the installation prefix of "launch_testing_ament_cmake" to
 CMAKE_PREFIX_PATH or set "launch_testing_ament_cmake_DIR" to a directory
 containing one of the above files.  If "launch_testing_ament_cmake"
 provides a separate development package or SDK, be sure it has been
 installed.

Then I followed the solutions suggested here: https://answers.ros.org/question/3304....

The same issue persists may be because the file in the docker should contain all these files which brings me back to the original docker pull, now that I have it what should I do next?

Please help with this. Thanks in advance.

edit retag flag offensive close merge delete

Comments

Just to be sure. Have you done the git clone inside the container?

Solrac3589 gravatar image Solrac3589  ( 2020-12-21 01:17:59 -0500 )edit

In the case the issue is missing dependencies, a fast trick for me should do to do a new imaged based on the one you are using here (starting with FROM acutronicrobotics/gym-gazebo2:latest if I am not wrong) and add the dependencies. You can later keep this image for yourself or upload it on docker hub!

Solrac3589 gravatar image Solrac3589  ( 2020-12-21 01:22:23 -0500 )edit

I had downloaded it and i think i kinda succesfully loaded it.

The difference between yours and mines is that I amb actually using the example already loaded in the container instead of cloning it again.

cd ~/gym-gazebo2/examples/MARA
python3 gg_random.py -g

What I saw from the dockerhub web you posted here.

Hope is that.

PD: Remember you should change DDS to OpenSpice probably before executing it (it is said also in dockerhub)

export RMW_IMPLEMENTATION=rmw_opensplice_cpp
Solrac3589 gravatar image Solrac3589  ( 2020-12-21 01:38:50 -0500 )edit