Update Launch In SITL authored by shibohan's avatar shibohan
...@@ -42,30 +42,17 @@ Now you got an SITL instance launched with TCP and UDP access, you should have s ...@@ -42,30 +42,17 @@ Now you got an SITL instance launched with TCP and UDP access, you should have s
``` ```
Both “–out” refer to UDP connexion create by MAVProxy. We will use UDP access with mavros. Both “–out” refer to UDP connexion create by MAVProxy. We will use UDP access with mavros.
Get back to your ROS terminal. Let’s create a new directory for our launch file.
```shell
mkdir launch
cd launch
roscp mavros apm.launch apm.launch
```
Edit the launch file with correct **fcu_url** Edit the launch file with correct **fcu_url**
```shell ```shell
cd <droneoa_ros>/launch
nano apm.launch nano apm.launch
<arg name="fcu_url" default="udp://127.0.0.1:14551@14555" /> <arg name="fcu_url" default="udp://127.0.0.1:14551@14555" />
``` ```
Launch it with:
```shell
roslaunch apm.launch
```
## Launch Realsense Node [As required] ## Launch Supporting ROS Node
```shell ```shell
roslaunch realsense2_camera rs_camera.launch cd <droneoa_ros>/launch
``` roslaunch step1.launch
## Launch YDLidar Node [As required]
```shell
roslaunch ydlidar lidar.launch
``` ```
**Note:** For first time launch, run the following script to create a device name for ydlidar. **Note:** For first time launch, run the following script to create a device name for ydlidar.
```shell ```shell
...@@ -75,6 +62,12 @@ sudo sh initenv.sh ...@@ -75,6 +62,12 @@ sudo sh initenv.sh
``` ```
You may need to disconnect and reconnect the camera. You may need to disconnect and reconnect the camera.
## Launch droneos ROS Node [As required]
```shell
cd <droneoa_ros>/launch
roslaunch step2.launch
```
## Launch ROS node ## Launch ROS node
source you setup.bash source you setup.bash
```shell ```shell
...@@ -82,7 +75,7 @@ source <WORKSPACE_PATH>/devel/setup.bash ...@@ -82,7 +75,7 @@ source <WORKSPACE_PATH>/devel/setup.bash
rosrun droneoa_ros droneoa_ros rosrun droneoa_ros droneoa_ros
``` ```
## Simple Summary: ## [Optional] Launch Node Manually:
Open up a terminal with 4 tabs: Open up a terminal with 4 tabs:
- tab1: SITL instance - tab1: SITL instance
```shell ```shell
... ...
......