Create Run With Real Vehicle authored by shibohan's avatar shibohan
## Setup workspace
First, create a catkin workspace
```shell
mkdir -p ardupilot_ws/src
cd ardupilot_ws
catkin init
cd src
```
Clone the reprository
## Modify Launch Setting File
Let’s create a new directory for our launch file. (Arducopter)
```shell
mkdir launch
cd launch
roscp mavros apm.launch apm.launch
```
Connection defined by URL, you can use any supported type for FCU and GCS.
Supported schemas:
- Serial: /path/to/serial/device[:baudrate]
- Serial: serial:///path/to/serial/device[:baudrate][?ids=sysid,compid]
- Serial with hardware flow control: serial-hwfc:///path/to/serial/device[:baudrate][?ids=sysid,compid]
- UDP: udp://[bind_host][:port]@[remote_host[:port]][/?ids=sysid,compid]
- UDP broadcast until GCS discovery: udp-b://[bind_host][:port]@[:port][/?ids=sysid,compid]
- UDP broadcast (permanent): udp-pb://[bind_host][:port]@[:port][/?ids=sysid,compid]
- TCP client: tcp://[server_host][:port][/?ids=sysid,compid]
- TCP server: tcp-l://[bind_host][:port][/?ids=sysid,compid]
Note:
- Ids from URL overrides value given by system_id & component_id parameters.
- bind_host - default 0.0.0.0 - i.e. IP4 ANY
- UDP default ports: 14555 @ 14550
- UDP remote address updated every time with incoming packet on bind port.
- TCP default port: 5760
Edit the launch file with correct **url**
```shell
nano apm.launch
<arg name="fcu_url" default="udp://127.0.0.1:14551@14555" />
```
Launch it with:
```shell
roslaunch apm.launch
```
You can also launch apm.launch directly with additional param.
Example:
```shell
roslaunch mavros apm.launch fcu_url:=tcp://localhost gcs_url:=udp://@
```
## Launch ROS node
source you setup.bash
```shell
source <WORKSPACE_PATH>/devel/setup.bash
rosrun droneoa_ros droneoa_ros
```
\ No newline at end of file