@@ -4,7 +4,7 @@ A set of ros packages used on the UAVs, including velodyne lidar packages, gps s
...
@@ -4,7 +4,7 @@ A set of ros packages used on the UAVs, including velodyne lidar packages, gps s
## Description
## Description
The key items are in [`data_capture`](./data_capture/) which contains scripts and launch files to run data collecting nodes on the M600 (or any other DJI drone).
The key items are in the [data_capture](./data_capture/) node which contains scripts and launch files to run data collecting nodes on the M600 (or any other DJI drone).
## Table of Contents
## Table of Contents
...
@@ -15,7 +15,7 @@ The key items are in [`data_capture`](./data_capture/) which contains scripts an
...
@@ -15,7 +15,7 @@ The key items are in [`data_capture`](./data_capture/) which contains scripts an
## Usage
## Usage
Before using any part of this repository, the jetson or other onboard computer need to have the correct hardware setup to communicate with the drone in question, see the DJI hardware [setup guide][dji hardware guide].
Before using any part of this repository, the jetson or other onboard computer need to have the correct hardware setup to communicate with the drone in question, see the DJI hardware [setup guide][dji hardware guide]. The onboard computer will also need the Onboard SDK to be installed before the ROS package is added (super confusing, we know), find and build from [github][core sdk github]. If ROS is not already installed on the onboard computer, consider taking a look at the DJI software [setup guide][dji software guide].
### Basic Usage via Launch File
### Basic Usage via Launch File
...
@@ -23,10 +23,58 @@ To start the base set of nodes, along with a rosbag recorder, simply run `roslau
...
@@ -23,10 +23,58 @@ To start the base set of nodes, along with a rosbag recorder, simply run `roslau
### DJI Onboard SDK
### DJI Onboard SDK
DJI provides some [documentation][dji onboard sdk docs] on their onboard SDK node, additional documentation on the [github][dji onboard sdk github]. After installing the SDK and subsequent ROS package, you can do a quick test by running `roslaunch dji_sdk sdk.launch`. From there all the topics related to the drone's operation should be available, try `rostopic echo \dji_sdk\gps_position` for verification.
### Database Uploader
### Database Uploader
The database uploader node, named `db_uploader` in ROS, is a dead-simple python node that uploads a dictionary of information to an mySQL database/table. The node begins by subscribing to the `dji_sdk/gps_position` topic, and associates a callback that uploads information to the table. The dictionary of information contains:
- gps position data:
+ latitude
+ longitude
+ sequence number
- task id: hardcoded as `'search_0'`
- created_at: datetime.datetime.now()
- updated_at: datetime.datetime.now()
- device id: hardcoded as `'drone_0'`
After building the dictionary, the node uploads it via:
`
mydb = mysql.connector.connect(
host="172.29.56.174",
user="VACSE",
passwd="VACSE529",
database="saruser"
)
`
There is some nuances to how the SQL table module works though, which is called `mySQL.connector`, and there is some odd formatting steps to create an SQL command. See the [node](./data_capture/scripts/db_upload) for details. For testing without a drone handy, use the [db_stream](./data_capture/scripts/db_stream).
### Velodyne Pointcloud Stream
### Velodyne Pointcloud Stream
Collects and optionally records Velodyne LiDAR data, in the form of a `.pcap` file. Here are some commands for testing/using the node: