Skip to content

lerema/color-tracker-genom3

Repository files navigation

ColorTracker component

A GenoM module for the ColorTracker using a monocular camera.

Ports

DronePose (in)

Data structure
  • struct ::or_pose_estimator::state DronePose

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::pos_cov > pos_cov

      • double cov[6]

    • optional< struct ::or::t3d::att_cov > att_cov

      • double cov[10]

    • optional< struct ::or::t3d::att_pos_cov > att_pos_cov

      • double cov[12]

    • optional< struct ::or::t3d::vel_cov > vel_cov

      • double cov[6]

    • optional< struct ::or::t3d::avel_cov > avel_cov

      • double cov[6]

    • optional< struct ::or::t3d::acc_cov > acc_cov

      • double cov[6]

    • optional< struct ::or::t3d::aacc_cov > aacc_cov

      • double cov[6]

The pose of the drone.


Frame (in)

Data structure
  • struct ::or::sensor::frame Frame

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean compressed

    • unsigned short height

    • unsigned short width

    • unsigned short bpp

    • sequence< octet > pixels

The image frame to process.


Intrinsics (in)

Data structure
  • struct ::or::sensor::intrinsics Intrinsics

    • struct ::or::sensor::calibration calib

      • float fx

      • float fy

      • float cx

      • float cy

      • float gamma

    • struct ::or::sensor::distortion disto

      • float k1

      • float k2

      • float k3

      • float p1

      • float p2


Extrinsics (in)

Data structure
  • struct ::or::sensor::extrinsics Extrinsics

    • struct ::or::sensor::translation trans

      • float tx

      • float ty

      • float tz

    • struct ::or::sensor::rotation rot

      • float roll

      • float pitch

      • float yaw


OccupancyGrid (out)

Data structure
  • struct ::or::Environment::OccupancyGrid OccupancyGrid

    • sequence< octet > data

    • octet width

    • octet height

    • double resolution

    • double origin_x

    • double origin_y

To visualise the findings in desired tool.


PlatesInfo (out)

Data structure
  • struct ::or::ColorTrack::PlateSequence PlatesInfo

    • sequence< struct ::or::ColorTrack::PlateInfo > seq

      • short index

      • unsigned long num_blobs

      • enum ::or::ColorTrack::PlateState state ∈ { UNKNOWN, INTERESTING, TREATED, NOT_NTERESTING }

      • struct ::or::t3d::pos coord

        • double x

        • double y

        • double z

    • octet num_interesing_spots

Information on detected blobs over time.


TargetPose (out)

Data structure
  • struct ::or_rigid_body::state TargetPose

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean intrinsic

    • optional< struct ::or::t3d::pos > pos

      • double x

      • double y

      • double z

    • optional< struct ::or::t3d::att > att

      • double qw

      • double qx

      • double qy

      • double qz

    • optional< struct ::or::t3d::vel > vel

      • double vx

      • double vy

      • double vz

    • optional< struct ::or::t3d::avel > avel

      • double wx

      • double wy

      • double wz

    • optional< struct ::or::t3d::acc > acc

      • double ax

      • double ay

      • double az

    • optional< struct ::or::t3d::aacc > aacc

      • double awx

      • double awy

      • double awz

    • optional< struct ::or::t3d::jerk > jerk

      • double jx

      • double jy

      • double jz

    • optional< struct ::or::t3d::snap > snap

      • double sx

      • double sy

      • double sz


output (multiple out)

Data structure
  • struct ::or::sensor::frame output

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean compressed

    • unsigned short height

    • unsigned short width

    • unsigned short bpp

    • sequence< octet > pixels

The image frame with the detected object.


mask (out)

Data structure
  • struct ::or::sensor::frame mask

    • struct ::or::time::ts ts

      • long sec

      • long nsec

    • boolean compressed

    • unsigned short height

    • unsigned short width

    • unsigned short bpp

    • sequence< octet > pixels

The color of the object to track.


Services

color_track (activity)

Throws
  • exception ::ColorTracker::e_OUT_OF_MEM

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_IMAGE_PORT

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_POSE_PORT

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_OG_PORT

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_TARGET_PORT

    • short code

    • string<128> message

  • exception ::ColorTracker::e_OPENCV_ERROR

    • short code

    • string<128> message

Context

Detect the color and keep track of coordinates from the image.


clear_findings (activity)

Throws
  • exception ::ColorTracker::e_OUT_OF_MEM

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_IMAGE_PORT

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_TARGET_PORT

    • short code

    • string<128> message

Context

Clear the found plates sequence.


set_color (attribute)

Inputs
  • struct ::or::ColorTrack::ColorInfo color: Color to be detected

    • long r

    • long g

    • long b

    • long threshold

Throws
  • exception ::ColorTracker::e_OPENCV_ERROR

    • short code

    • string<128> message

Set the color to be detected.


set_debug (attribute)

Inputs
  • boolean debug Debug mode

Set the debug mode.


set_camera_pose (attribute)

Inputs
  • struct ::ColorTracker::Pose camera_pose: Camera pose

    • float x

    • float y

    • float z

    • float roll

    • float pitch

    • float yaw

Set the camera pose with respect to robot frame.


set_map_size (attribute)

Inputs
  • float width (default "10") Estimated map width

  • float height (default "10") Estimated map height

Set the size of the map.


set_distance_threshold (attribute)

Inputs
  • float distance_threshold Distance threshold to sample the coordinates

Set the distance threshold to sample the coordinates using linear interpolation.


perform_tracking (attribute)

Inputs
  • boolean start_tracking Start tracking the object

Start tracking the object.


set_verbose_level (attribute)

Inputs
  • octet verbose_level Verbose level

Set the verbose level.


publish_occupancy_grid (attribute)

Inputs
  • boolean publish_og Publish occupancy grid

Publish the occupancy grid.


show_image_frames (attribute)

Inputs
  • boolean show_frames Show image frames

Show image frames.


set_object_size (attribute)

Inputs
  • float width Object width

  • float height Object length / height

Set the size of the object.


set_focal_length (attribute)

Inputs
  • float focal_length Focal length of the object at a distance of 1 meter

Set the focal length of the object at 1 m.


clear_findings (attribute)

Inputs
  • boolean clear_findings Clear the findings of plates

Clear the plates info findings.


set_map_size (function)

Inputs
  • octet map_width Estimated map width

  • octet map_height Estimated map height

Throws
  • exception ::ColorTracker::e_BAD_OG_PORT

    • short code

    • string<128> message

Set the size of the map.


clear_findins (function)

Throws
  • exception ::ColorTracker::e_OUT_OF_MEM

    • short code

    • string<128> message

Clear the findings.


Tasks

track

Context
Throws
  • exception ::ColorTracker::e_OUT_OF_MEM

    • short code

    • string<128> message

  • exception ::ColorTracker::e_BAD_IMAGE_PORT

    • short code

    • string<128> message

Track the object in the image.


About

A genom module for color tracking application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published