diff --git a/README.md b/README.md index 0af1075bb..6ef14b5a1 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,12 @@ 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 as docker a docker compose file. The is an environment provided for ArduSub, ArduCopter, ArduRover and ArduPlane. To configure the simulation environment, open the sim.yml file and uncomment the desired vehicle. Then, run the following command: + +``` +docker-compose -f sim.yml 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..e0e1e5d1f --- /dev/null +++ b/sim.yml @@ -0,0 +1,62 @@ +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 + + + # vehicle simulators: uncomment the one you want to use + # 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 + + # 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 + + # 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 + + # 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 \ No newline at end of file