Package pydoc for smartbot_irl.data
smartbot_irl.data#
Functions#
Return top-level keys from flatten(). |
|
Classes#
ArucoMarkers(poses: 'List[Pose]' = <factory>, marker_ids: 'List[int]' = <factory>) |
|
Generic pose with position, quaternion orientation, and roll pitch yaw angles. |
|
Represents a 2D planar laser scan message. |
|
PoseArray(poses: 'List[Pose]' = <factory>) |
|
IMU(qx: 'float' = 0.0, qy: 'float' = 0.0, qz: 'float' = 0.0, qw: 'float' = 1.0, roll: 'float' = 0.0, pitch: 'float' = 0.0, yaw: 'float' = 0.0, wx: 'float' = 0.0, wy: 'float' = 0.0, wz: 'float' = 0.0, ax: 'float' = 0.0, ay: 'float' = 0.0, az: 'float' = 0.0) |
|
Bool(data: 'bool' = False) |
|
State() |
|
JointState(names: 'List[str]' = <factory>, positions: 'List[float]' = <factory>, velocities: 'List[float]' = <factory>) |
Function Details#
Class Details#
- class smartbot_irl.data.ArucoMarkers(poses: 'List[Pose]' = <factory>, marker_ids: 'List[int]' = <factory>)[source]#
Bases:
object- Parameters:
poses (List[Pose])
marker_ids (List[int])
- marker_ids: List[int]#
- ros_type = 'ros2_aruco_interfaces/ArucoMarkers'#
- class smartbot_irl.data.Pose(x=0.0, y=0.0, z=0.0, qx=0.0, qy=0.0, qz=0.0, qw=1.0, roll=0.0, pitch=0.0, yaw=0.0)[source]#
Bases:
objectGeneric pose with position, quaternion orientation, and roll pitch yaw angles.
Maps to ROS2 message``geometry_msgs/Pose``. Has RPY angles for convenience.
- Parameters:
x (float)
y (float)
z (float)
qx (float)
qy (float)
qz (float)
qw (float)
roll (float)
pitch (float)
yaw (float)
- x(float)#
- Type:
Position along the X-axis in meters.
- y(float)#
- Type:
Position along the Y-axis in meters.
- z(float)#
- Type:
Position along the Z-axis in meters.
- qx(float)#
- Type:
Quaternion X component.
- qy(float)#
- Type:
Quaternion Y component.
- qz(float)#
- Type:
Quaternion Z component.
- qw(float)#
- Type:
Quaternion W component.
- roll(float)#
- Type:
Roll angle in radians.
- pitch(float)#
- Type:
Pitch angle in radians.
- yaw(float)#
- Type:
Yaw angle in radians.
- classmethod from_ros(msg)[source]#
Create a
Posefrom a ROSgeometry_msgs/Posemsg.The method extracts the
positionandorientationfields, converts the quaternion to roll–pitch–yaw usingscipy.spatial.transform.Rotation, and returns a populatedPose.- Parameters:
(dict) (msg)
keys (message with``position`` and orientation)
msg (dict)
- Returns:
Pose
- Return type:
Parsed pose instance.
- to_ros()[source]#
Create a
geometry_msgs/Posefrom a ROSPosemsg.The method extracts the
positionandorientationfields, then builds a dict matching the ROS2geometry_msgs/Posemessage structure.- Returns:
Dict mirroring ROS2
geometry_msgs/Posemessage structure.- Return type:
dict[str, dict[str, float]]
Example
>>> p = Pose(x=1.0, y=2.0, yaw=3.14) >>> ros = p.to_ros()
- pitch: float = 0.0#
- qw: float = 1.0#
- qx: float = 0.0#
- qy: float = 0.0#
- qz: float = 0.0#
- roll: float = 0.0#
- ros_type = 'geometry_msgs/Pose'#
- x: float = 0.0#
- y: float = 0.0#
- yaw: float = 0.0#
- z: float = 0.0#
- class smartbot_irl.data.LaserScan(ranges=<factory>, angle_min=0.0, angle_max=0.0, angle_increment=0.0)[source]#
Bases:
objectRepresents a 2D planar laser scan message.
This class mirrors the fields of the ros2 msg sensor_msgs/LaserScan and provides conversion helpers to and from ROS dictionary form.
- Parameters:
ranges (List[float])
angle_min (float)
angle_max (float)
angle_increment (float)
- ros_type#
The ROS message type string (“sensor_msgs/LaserScan”).
- Type:
str
- ranges#
Range readings from the laser in meters. Each value corresponds to a beam.
- Type:
list of float
- angle_min#
Start angle of the scan, in radians (usually negative).
- Type:
float
- angle_max#
End angle of the scan, in radians.
- Type:
float
- angle_increment#
Angular distance between successive measurements, in radians.
- Type:
float
- angle_increment: float = 0.0#
- angle_max: float = 0.0#
- angle_min: float = 0.0#
- ranges: List[float]#
- ros_type = 'sensor_msgs/LaserScan'#
- class smartbot_irl.data.PoseArray(poses: 'List[Pose]' = <factory>)[source]#
Bases:
object- Parameters:
poses (List[Pose])
- ros_type = 'geometry_msgs/PoseArray'#
- class smartbot_irl.data.IMU(qx: 'float' = 0.0, qy: 'float' = 0.0, qz: 'float' = 0.0, qw: 'float' = 1.0, roll: 'float' = 0.0, pitch: 'float' = 0.0, yaw: 'float' = 0.0, wx: 'float' = 0.0, wy: 'float' = 0.0, wz: 'float' = 0.0, ax: 'float' = 0.0, ay: 'float' = 0.0, az: 'float' = 0.0)[source]#
Bases:
object- Parameters:
qx (float)
qy (float)
qz (float)
qw (float)
roll (float)
pitch (float)
yaw (float)
wx (float)
wy (float)
wz (float)
ax (float)
ay (float)
az (float)
- ax: float = 0.0#
- ay: float = 0.0#
- az: float = 0.0#
- pitch: float = 0.0#
- qw: float = 1.0#
- qx: float = 0.0#
- qy: float = 0.0#
- qz: float = 0.0#
- roll: float = 0.0#
- ros_type = 'sensor_msgs/Imu'#
- wx: float = 0.0#
- wy: float = 0.0#
- wz: float = 0.0#
- yaw: float = 0.0#
- class smartbot_irl.data.Bool(data: 'bool' = False)[source]#
Bases:
object- Parameters:
data (bool)
- data: bool = False#
- ros_type = 'std_msgs/Bool'#
- class smartbot_irl.data.State[source]#
Bases:
object- property last: SimpleNamespace#
- next_index: int = 0#
- state_vec: DataFrame#
- class smartbot_irl.data.JointState(names: 'List[str]' = <factory>, positions: 'List[float]' = <factory>, velocities: 'List[float]' = <factory>)[source]#
Bases:
object- Parameters:
names (List[str])
positions (List[float])
velocities (List[float])
- names: List[str]#
- positions: List[float]#
- ros_type = 'sensor_msgs/JointState'#
- velocities: List[float]#