mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Merge pull request #2387 from mcharleb/SITL-readme-fix
SITL: updated README and rc.S
This commit is contained in:
commit
bfa840668b
@ -2,4 +2,4 @@
|
||||
|
||||
mkdir -p Build/posix_sitl.build/rootfs/fs/microsd
|
||||
mkdir -p Build/posix_sitl.build/rootfs/eeprom
|
||||
cd Build/posix_sitl.build && ./mainapp ../../posix-configs/SITL/init/rc.S
|
||||
cd Build/posix_sitl.build && ./mainapp ../../posix-configs/SITL/init/rcS
|
||||
|
||||
@ -18,11 +18,18 @@ Steps
|
||||
|
||||
1. Connect the RC Controller (PIXHAWK) to the PX4 machine using USB. Verify the `/dev/ttyACM0` device appears. Make sure that the persmissions of this device allow the PX4 app to open the device for read/write (`sudo chmod 777 /dev/ttyACM0`).
|
||||
|
||||
1. Launch PX4 from the root of the PX4 code "`./Firmware`" using the command below. The optional `<startup_file>` can be used to cause a set of commands to be entered into the PX4 shell at startup. Without this file, the commands can be entered at the shell prompt one at a time. An example startup file is given below. This example shows that the "mavlink" module has selected port 14556 for its socket server (as shown in the SITL diagram) and will listen for connections on this port.
|
||||
1. Launch PX4 from the SITL build directory "`./Firmware/Build/posix_sitl.build/`" using the command below. The optional `<startup_file>` can be used to cause a set of commands to be entered into the PX4 shell at startup.
|
||||
```
|
||||
> Build/posix_sitl.build/mainapp <startup_file>
|
||||
> ./mainapp <startup_file>
|
||||
```
|
||||
|
||||
There is a sample startup script at `posix_configs/SITL/init/rcS`.
|
||||
```
|
||||
> ./mainapp ../../posix_configs/SITL/init/rcS
|
||||
```
|
||||
|
||||
Without the `<startup_file>`, the commands can be entered at the shell prompt one at a time. An example startup file is given below. This example shows that the "mavlink" module has selected port 14556 for its socket server (as shown in the SITL diagram) and will listen for connections on this port.
|
||||
|
||||
1. qGroundControl (QGC) can be connected to this instance of PX4 any time after it is started. The instructions for configuring (QGC) are not given here in detail, but you just need to configure a UDP connection with ip_address:`<address of PX4 machine>` and port:14556. (QGC also has a "Listening Port" setting that must be set to another unused port).
|
||||
|
||||
1. jMAVSim can now be launched to complete the setup. At the root directory of the jMAVSim code, type the following command, replacing the IP address of the machine that is running PX4. The port 14550 is the default port of the simulator module in PX4.
|
||||
@ -79,5 +86,5 @@ param set RC_MAP_POSCTL_SW 7
|
||||
param set RC_MAP_RETURN_SW 8
|
||||
param set MC_PITCHRATE_P 0.05
|
||||
param set MC_ROLLRATE_P 0.05
|
||||
mixer load /dev/pwm_output0 ./ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
mixer load /dev/pwm_output0 ../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user