51 lines
1.8 KiB
Markdown
51 lines
1.8 KiB
Markdown
# Ways of running
|
|
|
|
There are two main ways of running this software.
|
|
|
|
Most users are recomended to install [VirtualBox](https://www.virtualbox.org/), create a new
|
|
VM, and use the supplied VDI as the disk image. You will likely want
|
|
to increase memory limits and CPU count above the default.
|
|
|
|
Advanced users can also use the SDK as a docker image. It pairs well with
|
|
[distrobox](https://github.com/89luca89/distrobox) to better
|
|
integrate it with their existing linux workflows.
|
|
|
|
```bash
|
|
distrobox create --image git.spirirobotics.com/spiri/spiri-sdk-desktop:master
|
|
distrobox enter spiri-sdk-desktop-master
|
|
|
|
cp -r /opt/spiri-sdk/user-home-skeleton/* ~/
|
|
cd ~/Desktop/simulated-drone/
|
|
./sim_drone.py launch
|
|
```
|
|
|
|
# Usage
|
|
|
|
Each drone has it's own ros master, you can specify a ros master by adding a sys_id to your port
|
|
|
|
To launch the drone, run the command `sim_drone.py start-group 2`. For more detailed information user
|
|
the `--help` command. You must run the command from inside a folder with a compliant dockerfile.
|
|
|
|
If using the VM there should be one on your desktop, if not you can run `cp -r /opt/spiri-sdk/user-home-skeleton/ ~/`
|
|
and all relevent development resources will be added to your home folder.
|
|
|
|
```bash
|
|
ROS_MASTER_URI=http://localhost:11311 rostopic list #Drone with sys_id 1
|
|
ROS_MASTER_URI=http://localhost:11312 rostopic list #Drone with sys_id 2
|
|
```
|
|
|
|
# Building
|
|
|
|
```bash
|
|
#Note that because this is running in a container, the -o output flag must be relative to the current directory.
|
|
# We mount the current working directory in the docker container as part of this script.
|
|
./virtualize.sh build ./ -s 100gb -o sdk.vdi
|
|
```
|
|
|
|
For testing the VM, I use the following
|
|
|
|
```bash
|
|
./virtualize.sh build ./ -s 100gb -o sdk.qcow2
|
|
qemu-system-x86_64 -display default,show-cursor=on -enable-kvm -device virtio-gpu -m 4g -smp 4 -hda sdk.qcow2
|
|
```
|