Docker script to build ROS docker image
Report Bug
·
Request Feature
This is a docker image to use ROS without it destroying your developing environment :D
To get a local copy up and running follow these simple steps.
You need to install Docker. For a more detailed explanation about Docker and Containers see: https://www.docker.com/get-started
- Docker installation
sudo apt-get -y install curl apt-transport-https ca-certificates software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-compose docker docker-ce
- Use docker without
sudo
(optional)
sudo groupadd docker
sudo usermod -aG docker $USER
su - ${USER}
id -nG
- Clone the docker_ros
git clone https:://github.com/dfvneto/docker_ros.git
- Build Docker Image
./build.sh
After installation, your docker image should have been built correctly. Now we have to access it:
- Accessing Docker Container
./access_docker.sh
- Now we can run our
roscore
node inside the container
roscore
Note that our terminal is "locked", so we need to access our container through another terminal.
- Open another terminal on the root folder and run:
docker ps
Look for the container ID of our recently created image ros_melodic:$USER
.
- Using the container ID run:
./new_view.sh DOCKER_ID
When inside the docker, you'll notice that the ros commands aren't available to us. We need to source the setup.bash
file from ros sources.
- To source our commands, simply run:
source /opt/ros/melodic/setup.bash
Now we are ready to try our container. On the first view of our container, roscore should be already running. On our second view we can try rostopic list
to see if we can see /rosout
and /ros_agg
topics. The expected output should be:
/rosout
/rosout_agg
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE
for more information.
Domingos Neto - [email protected]
Project Link: https://github.com/dfvneto/docker_ros