Commit f08db580 authored by Larkin Heintzman's avatar Larkin Heintzman

bunch of readme stuff

parent 8c81a984
...@@ -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:
- capture pcap file: rosrun velodyne_driver vdump PREFIX INTERFACE
- replay pcap file: roslaunch velodyne_pointcloud VLP16_points.launch pcap:=ABSOLUTE_PATH
- startup rviz: rosrun rviz rviz -f velodyne
- merge pcap files: mergecap -w output.pcap input.pcap input2.pcap [input3.pcap . . .]
### Steps for waypoint navigation (old)
- Start drone with jetson onboard connected to ftdi chip.
- Put controller into "F" mode.
- ssh into jetson.
- if simulating: start dji assistant.
- if simulating: checkAPI control settings page to prevent takeoff.
- if simulating: start simulation on assistant.
- use: `roslaunch dji_sdk sdk.launch` start sdk on jetson, verify with topics.
- use: `rosrun dji_sdk_demo demo_flight_control` to takeoff and execute path.
## Contributing ## Contributing
Refer contribution questions to [hlarkin3@vt.edu](mailto:hlarkin3@vt.edu) Refer contribution questions to [hlarkin3@vt.edu](mailto:hlarkin3@vt.edu)
...@@ -40,4 +88,8 @@ Work done in collaboration with members of the [CAS Lab][cas lab] at Virginia Te ...@@ -40,4 +88,8 @@ Work done in collaboration with members of the [CAS Lab][cas lab] at Virginia Te
This work is as yet unlicensed. This work is as yet unlicensed.
[dji hardware guide]: https://developer.dji.com/onboard-sdk/documentation/development-workflow/hardware-setup.html [dji hardware guide]: https://developer.dji.com/onboard-sdk/documentation/development-workflow/hardware-setup.html
[dji software guide]: https://developer.dji.com/onboard-sdk/documentation/development-workflow/sample-setup.html#before-you-start
[dji onboard sdk github]: https://github.com/dji-sdk/Onboard-SDK-ROS
[core sdk github]: https://github.com/dji-sdk/Onboard-SDK
[dji onboard sdk docs]: https://developer.dji.com/onboard-sdk/documentation/introduction/onboard-sdk-introduction.html
[cas lab]: https://caslab.ece.vt.edu/ [cas lab]: https://caslab.ece.vt.edu/
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment