-
Notifications
You must be signed in to change notification settings - Fork 0
moa_msgs
list of all custom msg, srv and actions used on the car and what they are used for.
The CAN
message is a ROS2 custom message type designed to encapsulate data for communication over a Controller Area Network (CAN) bus. This message type is particularly useful when interfacing with automotive systems or other devices that utilize the CAN protocol.
The CAN
message contains fields that represent a typical CAN frame: an identifier (id
), a Remote Transmission Request (is_rtr
), and a data array (data
).
Data type: uint16
The id
field represents the identifier for the CAN message. This identifier is used to distinguish between different types of messages on the CAN bus. The value of the id
field must be a non-negative integer between 0 and 65,535.
Data type: bool
The is_rtr
field stands for "Remote Transmission Request". This field is a boolean value that indicates whether the CAN message is a request for remote transmission. By default, this value is set to false
, meaning the CAN message is a data frame. If is_rtr
is true
, the CAN message is a Remote Frame, which is used to request data from a node, rather than carrying data itself.
Data type: uint8[8]
The data
field is an array of 8 bytes that contains the data being sent in the CAN message. Each element of the array must be a non-negative integer between 0 and 255. By default, all elements of the array are set to 0
. These bytes can be used to represent a variety of different values, depending on the specific needs of the system. For instance, in an autonomous vehicle application, these bytes could represent values such as speed, acceleration, jerk, steering angle, and steering angle velocity.
The CAN
message can be used in a ROS2 system by publishing it on a specific topic. The subscriber nodes that are listening to this topic can then decode the CAN
message and interpret the id
and data
fields according to the system's specific needs.
For instance, in the ack_to_can
node, the CAN
message is used to send Ackermann drive commands over the CAN bus. The data
array is populated with the converted Ackermann values, and the id
field is set to a specific value to indicate the type of message being sent. The is_rtr
field is left at its default value of false
, indicating that the message carries data.
While you can use the CAN message type directly for sending data over the CAN bus, it is generally recommended to use the CANStamped message instead. The CANStamped message provides additional metadata in the form of a standard ROS message header. This metadata can be invaluable for debugging, data analysis, and synchronization of messages. By using the CANStamped message, you can ensure that each CAN message is accompanied by a timestamp and a frame_id, which can greatly assist in managing and understanding the flow of messages in your system.
The ConeDetection
message is a ROS2 custom message type designed to encapsulate data related to the detection of cones in an environment.
The ConeDetection
message contains fields that provide information about the cone's ID, confidence of detection, color, position, rotation, and dimensions.
Data type: uint32
The id
field represents a unique identifier for the detected cone. This is optional and defaults to 0
if not given. The identifier can be used to track the same cone across multiple detections or frames.
Data type: float32
The confidence
field represents the confidence level of the detection, expressed as a percentage between 0
and 100
. A higher confidence value indicates a higher level of certainty that the detected object is indeed a cone.
Data type: uint8
The colour
field represents the color of the detected cone. The color is encoded as an integer where 0
represents Blue, 1
represents Orange, 2
represents Yellow, and 3
represents Other.
Data type: geometry_msgs/PoseWithCovariance
The pose
field represents the position and orientation of the detected cone in 3D space. The position is given by the (x, y, z) coordinates and the orientation is represented as a quaternion. The PoseWithCovariance
message also includes a covariance matrix, which provides information about the uncertainty of the position and orientation estimates.
Data type: float32
The radius
field represents the radius of the base of the detected cone. This value defaults to 0.0
if not provided.
Data type: float32
The height
field represents the height of the detected cone. This value defaults to 0.0
if not provided.
The ConeMap
message is a ROS2 custom message type designed to encapsulate a collection of detected cones.
The ConeMap
message contains a single field, cones
, which is an array of Cone
messages. Each Cone
message in the array represents a single detected cone and provides information about that cone's unique ID, confidence of detection, color, position, rotation, and dimensions.
Data type: Cone[]
The cones
field is an array of Cone
messages. Each Cone
message in the array represents a single detected cone. The array can contain any number of Cone
messages, from zero up to the limit imposed by the system's memory.
The Cone
message, as described in the Cone
message documentation, contains fields that provide information about the cone's ID, confidence of detection, color, position, rotation, and dimensions.