|
SMACC2
|
#include <cp_camera.hpp>


Public Member Functions | |
| CpCamera (const CameraParams ¶ms) | |
| ~CpCamera () override | |
| void | onInitialize () override |
| const CameraParams & | params () const |
| FramePtr | latestFrame () const |
| std::optional< PinholeCamera > | model (const Frame &frame) const |
Public Member Functions inherited from smacc2::ISmaccComponent | |
| ISmaccComponent () | |
| virtual | ~ISmaccComponent () |
| ISmaccComponent (const ISmaccComponent &)=delete | |
| ISmaccComponent & | operator= (const ISmaccComponent &)=delete |
| ISmaccComponent (ISmaccComponent &&)=delete | |
| ISmaccComponent & | operator= (ISmaccComponent &&)=delete |
| virtual std::string | getName () const |
Public Attributes | |
| smacc2::SmaccSignal< void(const FramePtr &)> | onFrame_ |
Private Member Functions | |
| void | onImage (const sensor_msgs::msg::Image::ConstSharedPtr msg) |
| void | onInfo (const sensor_msgs::msg::CameraInfo::ConstSharedPtr msg) |
Private Attributes | |
| CameraParams | params_ |
| CpTransforms * | transforms_ = nullptr |
| rclcpp::Subscription< sensor_msgs::msg::Image >::SharedPtr | imageSubscriber_ |
| rclcpp::Subscription< sensor_msgs::msg::CameraInfo >::SharedPtr | infoSubscriber_ |
| std::mutex | mutex_ |
| FramePtr | latest_ |
| uint64_t | sequence_ = 0 |
| bool | calibrated_ = false |
| double | fx_ = 1.0 |
| double | fy_ = 1.0 |
| double | cx_ = 0.0 |
| double | cy_ = 0.0 |
Additional Inherited Members | |
Protected Member Functions inherited from smacc2::ISmaccComponent | |
| template<typename TOrthogonal , typename TClient > | |
| void | onComponentInitialization () |
| template<typename EventType > | |
| void | postEvent (const EventType &ev) |
| template<typename EventType > | |
| void | postEvent () |
| template<typename TOrthogonal , typename TSourceObject > | |
| void | onStateOrthogonalAllocation () |
| template<typename TComponent > | |
| void | requiresComponent (TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename TComponent > | |
| void | requiresComponent (const std::string &name, TComponent *&requiredComponentStorage, ComponentRequirement requirementType=ComponentRequirement::SOFT) |
| template<typename TClient > | |
| void | requiresClient (TClient *&requiredClientStorage) |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createSiblingComponent (const TArgs &... targs) |
| template<typename SmaccComponentType , typename TOrthogonal , typename TClient , typename... TArgs> | |
| SmaccComponentType * | createSiblingNamedComponent (const std::string &name, const TArgs &... targs) |
| rclcpp::Node::SharedPtr | getNode () |
| rclcpp::Logger | getLogger () const |
| ISmaccStateMachine * | getStateMachine () |
Protected Attributes inherited from smacc2::ISmaccComponent | |
| ISmaccStateMachine * | stateMachine_ = nullptr |
| ISmaccClient * | owner_ = nullptr |
Definition at line 44 of file cp_camera.hpp.
|
explicit |
Definition at line 23 of file cp_camera.cpp.
|
override |
Definition at line 25 of file cp_camera.cpp.
| FramePtr cl_rgb::CpCamera::latestFrame | ( | ) | const |
Definition at line 87 of file cp_camera.cpp.
References latest_, and mutex_.
Referenced by cl_rgb::CbSurveyTable::onEntry(), and cl_rgb::CbWaitForFrame::wireCompletionSignals().

| std::optional< PinholeCamera > cl_rgb::CpCamera::model | ( | const Frame & | frame | ) | const |
Definition at line 93 of file cp_camera.cpp.
References calibrated_, cl_rgb::PinholeCamera::cx, cx_, cl_rgb::PinholeCamera::cy, cy_, cl_rgb::Frame::frameId, cl_rgb::PinholeCamera::fx, fx_, cl_rgb::PinholeCamera::fy, fy_, cl_rgb::CpTransforms::lookup(), mutex_, params_, cl_rgb::PinholeCamera::position, cl_rgb::PinholeCamera::rotation, cl_rgb::Frame::stamp, transforms_, and cl_rgb::CameraParams::worldFrame.
Referenced by cl_rgb::CbSurveyTable::onEntry().


|
private |
Definition at line 42 of file cp_camera.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), latest_, mutex_, cl_rgb::CameraParams::name, onFrame_, params_, and sequence_.
Referenced by onInitialize().


|
private |
Definition at line 71 of file cp_camera.cpp.
References calibrated_, cx_, cy_, fx_, fy_, smacc2::ISmaccComponent::getLogger(), mutex_, cl_rgb::CameraParams::name, and params_.
Referenced by onInitialize().


|
overridevirtual |
Reimplemented from smacc2::ISmaccComponent.
Definition at line 27 of file cp_camera.cpp.
References smacc2::ISmaccComponent::getLogger(), smacc2::ISmaccComponent::getNode(), smacc2::HARD, imageSubscriber_, cl_rgb::CameraParams::imageTopic, infoSubscriber_, cl_rgb::CameraParams::infoTopic, cl_rgb::CameraParams::name, onImage(), onInfo(), params_, smacc2::ISmaccComponent::requiresComponent(), and transforms_.

|
inline |
|
private |
Definition at line 76 of file cp_camera.hpp.
|
private |
Definition at line 77 of file cp_camera.hpp.
|
private |
Definition at line 77 of file cp_camera.hpp.
|
private |
Definition at line 77 of file cp_camera.hpp.
|
private |
Definition at line 77 of file cp_camera.hpp.
|
private |
Definition at line 70 of file cp_camera.hpp.
Referenced by onInitialize().
|
private |
Definition at line 71 of file cp_camera.hpp.
Referenced by onInitialize().
|
private |
Definition at line 74 of file cp_camera.hpp.
Referenced by latestFrame(), and onImage().
|
mutableprivate |
Definition at line 73 of file cp_camera.hpp.
Referenced by latestFrame(), model(), onImage(), and onInfo().
| smacc2::SmaccSignal<void(const FramePtr &)> cl_rgb::CpCamera::onFrame_ |
Definition at line 62 of file cp_camera.hpp.
Referenced by onImage(), and cl_rgb::CbWaitForFrame::wireCompletionSignals().
|
private |
Definition at line 68 of file cp_camera.hpp.
Referenced by model(), onImage(), onInfo(), onInitialize(), and params().
|
private |
Definition at line 75 of file cp_camera.hpp.
Referenced by onImage().
|
private |
Definition at line 69 of file cp_camera.hpp.
Referenced by model(), and onInitialize().