-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #133 from open-dynamic-robot-initiative/fkloss/sen…
…sor_info Add optional sensor_info to sensor interface
- Loading branch information
Showing
11 changed files
with
166 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
**************** | ||
Sensor Interface | ||
**************** | ||
|
||
``robot_interfaces`` also provides base classes for a pure sensor interface. In | ||
contrast to a robot, a sensor only provides observations but does not take actions. | ||
Apart from that, the overall structure is mostly the same as for a robot. That is, | ||
there are :cpp:class:`~robot_interfaces::SensorBackend` and | ||
:cpp:class:`~robot_interfaces::SensorFrontend` which communicate via | ||
:cpp:class:`~robot_interfaces::SensorData` (either single- or multi-process). | ||
|
||
For implementing an interface for your sensor, you only need to implement an observation | ||
type and a driver class based on :cpp:class:`~robot_interfaces::SensorDriver`. Then | ||
simply create data/backend/frontend using those custom types as template arguments. | ||
|
||
Optionally, your driver class can also provide a "sensor info" object by implementing | ||
:cpp:func:`~robot_interfaces::SensorDriver::get_sensor_info`. This object is then | ||
accessible by the user via | ||
:cpp:func:`~robot_interfaces::SensorFrontend::get_sensor_info`. You may use this, to | ||
provide static information about the sensor, that does not change over time (e.g. frame | ||
rate of a camera). | ||
If you don't implement the corresponding method in the driver, the front end will return | ||
an empty struct as placeholder. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.