|
|
| SDK (int argc, char **argv, const std::string &node_name) |
| |
| void | setSkipFlightControllerConnectionCheck (bool skip) |
| |
|
void | run (RunOptions options=RunOptions()) |
| |
|
rclcpp::Node::SharedPtr | defaultRosHandle () const |
| |
| bool | canWaitForData () const |
| | Whether the calling thread can wait for data the SDK receives.
|
| |
|
rclcpp::Time | now () const |
| |
|
void | addNode (rclcpp::Node::SharedPtr node) |
| |
|
void | removeNode (rclcpp::Node::SharedPtr node) |
| |
| ShutdownCallbackHandle | addShutdownCallback (std::function< void()> callback) |
| | Register a callback for the app's shutdown (a signal, or requestShutdown())
|
| |
|
void | removeShutdownCallback (const ShutdownCallbackHandle &handle) |
| |
| void | requestShutdown (const std::string &reason) |
| | Shut the app down: the shutdown callbacks run, and run() returns.
|
| |
|
const rclcpp::executors::SingleThreadedExecutor::UniquePtr & | executor () const |
| |
| template<typename T > |
| T | getParameter (const std::string &name, std::function< void(const T &)> on_change_callback=nullptr) |
| | Get a parameter value and optionally register a callback for changes.
|
| |
| template<typename T > |
| void | setParameter (const std::string &name, const T &value) |
| | Set a parameter.
|
| |
| template<typename T > |
| void | setSystemParameter (const std::string &full_name, const T &value) |
| | Set a parameter of another app or service.
|
| |
|
|
template<> |
| bool | getParameter (const std::string &name, std::function< void(const bool &)> on_change_callback) |
| |
|
template<> |
| int64_t | getParameter (const std::string &name, std::function< void(const int64_t &)> on_change_callback) |
| |
|
template<> |
| int | getParameter (const std::string &name, std::function< void(const int &)> on_change_callback) |
| |
|
template<> |
| float | getParameter (const std::string &name, std::function< void(const float &)> on_change_callback) |
| |
|
template<> |
| double | getParameter (const std::string &name, std::function< void(const double &)> on_change_callback) |
| |
|
template<> |
| std::string | getParameter (const std::string &name, std::function< void(const std::string &)> on_change_callback) |
| |
|
template<> |
| std::vector< bool > | getParameter (const std::string &name, std::function< void(const std::vector< bool > &)> on_change_callback) |
| |
|
template<> |
| std::vector< int64_t > | getParameter (const std::string &name, std::function< void(const std::vector< int64_t > &)> on_change_callback) |
| |
|
template<> |
| std::vector< int > | getParameter (const std::string &name, std::function< void(const std::vector< int > &)> on_change_callback) |
| |
|
template<> |
| std::vector< float > | getParameter (const std::string &name, std::function< void(const std::vector< float > &)> on_change_callback) |
| |
|
template<> |
| std::vector< double > | getParameter (const std::string &name, std::function< void(const std::vector< double > &)> on_change_callback) |
| |
|
template<> |
| std::vector< std::string > | getParameter (const std::string &name, std::function< void(const std::vector< std::string > &)> on_change_callback) |
| |
SDK execution class. All callbacks are called on the same thread.
The SDK receives data (vehicle state, camera info and status, images, detections, parameter changes, ...) only for the API calls that ask for it: it subscribes on the first use of the API that needs the data, which saves the CPU of messages the app never uses. A first query that has to wait for its data says so in its documentation. What rclcpp creates on every node is left as rclcpp creates it.
| ShutdownCallbackHandle auterion::SDK::addShutdownCallback |
( |
std::function< void()> |
callback | ) |
|
Register a callback for the app's shutdown (a signal, or requestShutdown())
It runs before ROS shuts down, so it can still publish and send asynchronous requests, e.g. to hand a camera's controls back. Not necessarily on the SDK executor's thread. Remove it before the objects it captures die: the SDK's destructor shuts ROS down too, which runs the callbacks still registered.
- Returns
- a handle to remove the callback with