diff --git a/README.md b/README.md index 0af1075bb..6de155b9f 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,13 @@ If you're running a BlueOS instance, just put the IP address of it in "Global ve If you're serving `mavlink2rest` in the same machine as Cockpit, activate the checkmark for "Mavlink2Rest connection" and use `ws://127.0.0.1:6040/v1/ws/mavlink` there (if you're running a mavlink2rest version before 0.11.15, omit the `/v1` in the URL). If you're serving `mavlink-camera-manager` in the same machine as Cockpit, activate the checkmark for "WebRTC connection" and use `ws://127.0.0.1:6020` there. + +## Simulating a vehicle + +Cockpit provides a simulation environments in a docker compose file. There is an environment provided for ArduSub, ArduCopter, ArduRover and ArduPlane. The compose file uses docker compose profiles to allow you to choose which vehicle you want to simulate. The available profiles are `ardusub`, `arducopter`, `ardurover` and `arduplane`. You can run a simulation environment by running the following command: + +``` +docker-compose -f sim.yml --profile ardusub up +``` + +Assuming you have run the `bun run dev --host` command, you can access the simulation environment by opening the browser and accessing `localhost:5173`. \ No newline at end of file diff --git a/sim.yml b/sim.yml new file mode 100644 index 000000000..216d9efb6 --- /dev/null +++ b/sim.yml @@ -0,0 +1,68 @@ +version: "3.3" +services: + + mavlink2rest: + image: "ericjohnson97/iq_sim_mavlink2rest:t0.11.19" + network_mode: "host" + environment: + - "MAVLINK_SRC=udpin:127.0.0.1:14551" + - "SERVER_PORT=0.0.0.0:6040" + + mavp2p: + image: "ericjohnson97/iq_sim_server_mavp2p:latest" + network_mode: "host" + environment: + CMD: "./mavp2p tcpc:127.0.0.1:5760 udpc:127.0.0.1:14550 udpc:127.0.0.1:14551" + restart: "on-failure" + + arducopter: + image: "ericjohnson97/iq_sim_server_ardupilot:Copter-4.4.0" + network_mode: "host" + restart: "on-failure" + environment: + VEHICLE: "Copter" + MODEL: "+" + LAT: "-27.63256" + LON: "-48.58706" + SYSID: "1" + profiles: + - "arducopter" + + arduplane: + image: "ericjohnson97/iq_sim_server_ardupilot:Plane-4.4.0" + network_mode: "host" + restart: "on-failure" + environment: + VEHICLE: "ArduPlane" + MODEL: "plane" + LAT: "-27.63256" + LON: "-48.58706" + SYSID: "1" + profiles: + - "arduplane" + + ardurover: + image: "ericjohnson97/iq_sim_server_ardupilot:Rover-4.2.2" + network_mode: "host" + restart: "on-failure" + environment: + VEHICLE: "APMrover2" + MODEL: "rover" + LAT: "-27.63256" + LON: "-48.58706" + SYSID: "1" + profiles: + - "ardurover" + + ardusub: + image: "ericjohnson97/iq_sim_server_ardupilot:ArduSub-4.1.1" + network_mode: "host" + restart: "on-failure" + environment: + VEHICLE: "ArduSub" + MODEL: "vectored" + LAT: "-27.63256" + LON: "-48.58706" + SYSID: "1" + profiles: + - "ardusub"