Sign inSign up

goldarte/clover-ds

By goldarte

•Updated over 6 years ago

Clover docker image with roscore, clever and sitl services running inside.

Image
0

340

goldarte/clover-ds repository overview

⁠clover-ds

Docker image for Clover⁠ drone simulation with roscore, clover and px4 SITL services running inside.

This container includes:

⁠Prepare

It is assumed that you have installed latest docker version. Instruction is here⁠.

Clone this repository and cd into it:

git clone https://github.com/goldarte/clover-ds.git
cd <cloned repo>

⁠Run container for connecting to external simulator

Execute run bash script to run container with name and hostname sim-1:

./run

Sitl service will listen UDP messages from external simulator (like Gazebo⁠ or Airsim⁠) on UDP port 14561.

⁠Run container with lightweight simulation inside

Execute run bash script with --headless option:

./run --headless

Sitl service will connect to headless version of jMAVSim⁠ simulator with simple simulation of outdoor conditions.

⁠Configure

You can specify next options for run script:

./run [options]

Options:
  -h --help         Print this message
  -i --id=ID        ID of simulated copter. Used as MAV_SYS_ID.
                    Container name and hostname are set to sim-<ID> (default: 1)
  -p --port=PORT    Initial UDP port (default: 14560)
                    UDP listening port for simulator data is set to <PORT>+<ID>
  --headless        Set this option to run lightweight jmavsim simulator directly in container
  --lat=LATITUDE    Set initial latitude
  --lon=LONGITUDE   Set initial longitude
  --dx=DX           Set dx shift in meters to East (default: 0)
  --dy=DY           Set dy shift in meters to North (default: 0)
See defaults for initial latitude and longitude here:
https://github.com/goldarte/clover-ds/blob/master/scripts/calculate_gps.py#L7

Each time you want to run new container it must have unique ID and UDP port for simulator data!

There will be 3 services running inside the container: roscore, clover, sitl. If you set --headless option, there will be running jmavsim service also.

You can manage running services inside the container using systemctl and watch their logs with journalctl -u <service name>. For example if you want to restart the service clover, just use systemctl restart clover.

If you want to open new terminal session in working container, use following command:

docker exec -it <container name> bash

To stop or kill containers you can use

docker stop <container name>
docker kill <container name>

To get information about running containers you can use

docker ps

Tag summary

Content type

Image

Digest

Size

2 GB

Last updated

over 6 years ago

docker pull goldarte/clover-ds