35 #include <Eigen/Dense>
36 #include <opencv2/core/mat.hpp>
37 #include <opencv2/core/types.hpp>
39 #include <rclcpp/rclcpp.hpp>
75 TrackingResult(
const cv::Point& object_center,
const cv::Size& object_size,
76 const float confidence = 1.f,
TrackingState state = TrackingState::UNKNOWN);
82 TrackingResult& withObjectDirection(
const Eigen::Vector3f& direction, Frame frame);
84 inline cv::Point getObjectCenter()
const {
return _object_center; }
85 inline cv::Size getObjectSize()
const {
return _object_size; }
86 inline float getConfidence()
const {
return _confidence; }
87 inline TrackingState getTrackingState()
const {
return _tracking_state; }
88 Eigen::Vector3f getObjectDirection(Frame frame = Frame::Camera)
const;
91 cv::Size _object_size;
92 cv::Point _object_center;
93 Eigen::Vector3f _object_direction_camera_frame;
95 Eigen::Vector3f _object_direction_body_frame;
97 Eigen::Vector3f _object_direction_world_frame;
119 std::optional<rclcpp::Time>
Camera client to subscribe to a camera image stream.
Definition: camera.hpp:307
Represents the result of an image tracking operation.
Definition: common.hpp:65
std::ostream & operator<<(std::ostream &os, const TrackingState &state)
Overloaded << operator to stringify the TrackingState enum.
TrackingState
Tracking state enum to represent different tracking states.
Definition: common.hpp:46
Represents the tracking selection as received by AMC.
Definition: common.hpp:114
std::optional< rclcpp::Time > timestamp
Optional timestamp for the tracking selection (not currently used).
Definition: common.hpp:120
cv::Size2d normalized_window_size
Definition: common.hpp:117
TrackingSelection(cv::Point2d normalized_point)
Constructor for creating a tracking selection with a point only.
Definition: common.hpp:127
cv::Point2d normalized_point
Definition: common.hpp:115
TrackingSelection(cv::Point2d normalized_point, cv::Size2d normalized_window_size)
Constructor for creating a tracking selection with a point and a window size. This should be used whe...
Definition: common.hpp:140