onboardsdk
|
The Blueye SDK provides a set of libraries and tools for controlling and interacting with Blueye drones. It enables developers to communicate with the drone, access sensor data, and control various aspects of its behavior.
To start using the Blueye SDK, follow these steps:
Deactivate the Blueye control system (persistent)
Create a folder for your code and add user_program.cpp
Write a CMakeLists.txt
file.
Start the docker container (You might change back to your Wi-Fi with internet for this):
In the container, run:
Copy the program to the drone
Run the program on the drone
You will see the output of your code, but also output from the library. The output from the library is prefixed with blunux:
and can be deactivated in the user program, see for example be-drone-imu.cpp.
The Blueye SDK comes with several examples to help you get started quickly. Here are some example applications:
Refer to these examples for practical usage scenarios and integration into your own projects.
The Blueye SDK provides a comprehensive API for interacting with the drone. For detailed information about the available classes, methods, and data structures, follow the links on the top of the page.
Copy the files to the drone:
The -O
is for compatibility and not needed on all systems.
Create an empty file with the name entrypoint
, make it executable, and copy it to the drone.
Reboot the drone by running:
When the drone comes up again, the blueye control system should not be running.
Now, you can login to your drone and start your program manually:
If you always want to start your program automatically, you can add it to the entrypoint file.
For example:
You can login to the drone as follows:
Unless there is a /data/sdk/entrypoint
, the Blueye control system is launched when the drone starts. When you create an own entrypoint, make sure it's executable.
If present and executable, the /data/sdk/entrypoint
script will be run instead of the Blueye control system.
Sometimes, you might want to run your own programs, but still use the Blueye control system. In this case, you can create an executable file /data/sdk/entrypoint_extra
. This will be run also when /data/sdk/entrypoint
does not exist and the Blueye control system is stated.
Please note the following:
If your program needs to store large amounts of data, you should save it on the SD card instead of the internal memory. The folder you can use is /videos/sdk
.
To remove your custom data, login to the drone and delete all the files in /data/sdk and /videos/sdk. The drone should then start as usual.
On some systems, you might get the following error when trying to copy data to the drone:
If this happens, try to use scp -O
instead: