|
mars
|
#include <HighResRangeFinder.hpp>
Classes | |
| struct | Camera |
Public Member Functions | |
| HighResRangeFinder (std::string const &name="mars::HighResRangeFinder") | |
| HighResRangeFinder (std::string const &name, RTT::ExecutionEngine *engine) | |
| ~HighResRangeFinder () | |
| bool | configureHook () |
| The following lines are template definitions for the various state machine. More... | |
| bool | startHook () |
| void | updateHook () |
| void | errorHook () |
| void | stopHook () |
| void | cleanupHook () |
| virtual void | getData () |
Protected Member Functions | |
| virtual bool | addCamera (::std::string const &name, double orientation) |
| void | calcCamParameters (Camera *camera) |
Protected Attributes | |
| std::vector< Camera * > | cameras |
Friends | |
| class | HighResRangeFinderBase |
Allows to simulate 360deg laserscanners using distance images to increase performance. At the moment each camera sensor in MARS provides an opening angle of 90deg, so four cameras are required to cover the complete 360deg. Initially a single camera is used to create the pointcloud and with 'addCamera()' further cameras can be added. The following example shows how to start this sensor using two cameras in ruby:
See the documentation of addCamera() for a scene file example.
The z-axis of the image scene coordinate system points towards the image plane, the x-axis points right and the y-axis down.
| HighResRangeFinder::HighResRangeFinder | ( | std::string const & | name = "mars::HighResRangeFinder" | ) |
TaskContext constructor for HighResRangeFinder
| name | Name of the task. This name needs to be unique to make it identifiable via nameservices. |
| initial_state | The initial TaskState of the TaskContext. Default is Stopped state. |
| HighResRangeFinder::HighResRangeFinder | ( | std::string const & | name, |
| RTT::ExecutionEngine * | engine | ||
| ) |
TaskContext constructor for HighResRangeFinder
| name | Name of the task. This name needs to be unique to make it identifiable for nameservices. |
| engine | The RTT Execution engine to be used for this task, which serialises the execution of all commands, programs, state machines and incoming events for a task. |
| HighResRangeFinder::~HighResRangeFinder | ( | ) |
Default deconstructor of HighResRangeFinder
|
protectedvirtual |
Loads another camera from the scene file which will be used for pointcloud creation. Within the scene file the yaw angle has to be used to create a full 360deg sensor.
E.g. the following scene file shows the front and the left camera.
| name | Name of the camera within the scene file. In the example above it would be 'velodyne90'. |
| orientation | Orientation of the camera around the y-axis within the camera frame. |
|
protected |
Calculates which pixel will be converted into scene points in regard to the opening angle and the scan resolution.
| void HighResRangeFinder::cleanupHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Stopped to PreOperational, requiring the call to configureHook() before calling start() again.
| bool HighResRangeFinder::configureHook | ( | ) |
The following lines are template definitions for the various state machine.
This hook is called by Orocos when the state machine transitions from PreOperational to Stopped. If it returns false, then the component will stay in PreOperational. Otherwise, it goes into Stopped.
It is meaningful only if the #needs_configuration has been specified in the task context definition with (for example):
task_context "TaskName" do needs_configuration ... end
| void HighResRangeFinder::errorHook | ( | ) |
This hook is called by Orocos when the component is in the RunTimeError state, at each activity step. See the discussion in updateHook() about triggering options.
Call recover() to go back in the Runtime state.
|
virtual |
Requests the distance image by calling DepthCamera::getData() and generates the pointcloud using the image data.
| bool HighResRangeFinder::startHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Stopped to Running. If it returns false, then the component will stay in Stopped. Otherwise, it goes into Running and updateHook() will be called.
| void HighResRangeFinder::stopHook | ( | ) |
This hook is called by Orocos when the state machine transitions from Running to Stopped after stop() has been called.
| void HighResRangeFinder::updateHook | ( | ) |
This hook is called by Orocos when the component is in the Running state, at each activity step. Here, the activity gives the "ticks" when the hook should be called.
The error(), exception() and fatal() calls, when called in this hook, allow to get into the associated RunTimeError, Exception and FatalError states.
In the first case, updateHook() is still called, and recover() allows you to go back into the Running state. In the second case, the errorHook() will be called instead of updateHook(). In Exception, the component is stopped and recover() needs to be called before starting it again. Finally, FatalError cannot be recovered.
|
friend |
|
protected |
1.8.13