kompass.data_types#

Supported data types for inputs/outputs

Module Contents#

Classes#

Detections

Adds callback for automatika_embodied_agents/msg/Detections2D message

Trackings

Adds callback for automatika_embodied_agents/msg/Trackings message

PointsOfInterest

Adds callback for automatika_embodied_agents/msg/PointsOfInterest message

CameraInfo

Class to support ROS2 sensor_msgs/msg/CameraInfo message

LaserScan

Class to support ROS2 sensor_msgs/msg/LaserScan message

PointCloud2

Class to support ROS2 sensor_msgs/msg/PointCloud2 message

PointStamped

Class to support ROS2 geometry_msgs/msg/PointStamped message

Point

Class to support ROS2 geometry_msgs/msg/Point message

Pose

Class to support ROS2 geometry_msgs/msg/Pose message

PoseStamped

Class to support ROS2 geometry_msgs/msg/PoseStamped message

Odometry

Class to support ROS2 nav_msgs/msg/Odometry message

TwistStamped

Class to support ROS2 geometry_msgs/msg/TwistStamped message

TwistArray

Class to support ROS2 kompass_interfaces/msg/TwistArray message

Path

Class to support ROS2 nav_msgs/msg/Path message

API#

class kompass.data_types.Detections#

Bases: ros_sugar.supported_types.SupportedType

Adds callback for automatika_embodied_agents/msg/Detections2D message

class kompass.data_types.Trackings#

Bases: ros_sugar.supported_types.SupportedType

Adds callback for automatika_embodied_agents/msg/Trackings message

class kompass.data_types.PointsOfInterest#

Bases: ros_sugar.supported_types.SupportedType

Adds callback for automatika_embodied_agents/msg/PointsOfInterest message

class kompass.data_types.CameraInfo#

Bases: ros_sugar.supported_types.SupportedType

Class to support ROS2 sensor_msgs/msg/CameraInfo message

class kompass.data_types.LaserScan#

Bases: ros_sugar.supported_types.LaserScan

Class to support ROS2 sensor_msgs/msg/LaserScan message

classmethod convert(output: ros_sugar.io.LaserScanData, **_) sensor_msgs.msg.LaserScan#

Takes LaserScanData object and converts it to ROS LaserScan message

Returns:

LaserScan

class kompass.data_types.PointCloud2#

Bases: ros_sugar.supported_types.SupportedType

Class to support ROS2 sensor_msgs/msg/PointCloud2 message

class kompass.data_types.PointStamped#

Bases: ros_sugar.supported_types.PointStamped

Class to support ROS2 geometry_msgs/msg/PointStamped message

class kompass.data_types.Point#

Bases: ros_sugar.supported_types.Point

Class to support ROS2 geometry_msgs/msg/Point message

class kompass.data_types.Pose#

Bases: ros_sugar.supported_types.Pose

Class to support ROS2 geometry_msgs/msg/Pose message

class kompass.data_types.PoseStamped#

Bases: ros_sugar.supported_types.PoseStamped

Class to support ROS2 geometry_msgs/msg/PoseStamped message

class kompass.data_types.Odometry#

Bases: ros_sugar.supported_types.Odometry

Class to support ROS2 nav_msgs/msg/Odometry message

classmethod convert(output: kompass_core.models.RobotState, **_) nav_msgs.msg.Odometry#

Takes RobotState object and converts it to ROS Odometry message

Returns:

Odometry

class kompass.data_types.TwistStamped#

Bases: ros_sugar.supported_types.Twist

Class to support ROS2 geometry_msgs/msg/TwistStamped message

classmethod convert(output: Union[numpy.ndarray, List], **kwargs) geometry_msgs.msg.TwistStamped#

Converter to publish Twist data to TwistStamped

Parameters:

output (ROSTwist) – Twist message

Returns:

Twist stamped message

Return type:

ROSTwistStamped

class kompass.data_types.TwistArray#

Bases: ros_sugar.supported_types.SupportedType

Class to support ROS2 kompass_interfaces/msg/TwistArray message

classmethod convert(output: kompass_interfaces.msg.TwistArray, **_)#

convert.

Parameters:
  • output (ROSTwistArray)

  • kwargs

class kompass.data_types.Path#

Bases: ros_sugar.supported_types.Path

Class to support ROS2 nav_msgs/msg/Path message

classmethod to_json(path: nav_msgs.msg.Path, json_file: str)#

Saves a ROS nav_msg.msg.Path in a json file

Parameters:
  • path (nav_msg.msg.Path) – ROS path message

  • json_file (str) – Path to the saved file

classmethod from_json(json_file: str) Union[nav_msgs.msg.Path, None]#

Reads a given json file and parse a ROS nav_msgs.msg.Path if exists

Parameters:

json_file (str) – Path to the json file

Returns:

ROS path message

Return type:

Union[PathMsg, None]