Package pydoc for smartbot_irl.data

smartbot_irl.data#

Functions#

Classes#

smartbot_irl.data.ArucoMarkers

ArucoMarkers(poses: 'List[Pose]' = <factory>, marker_ids: 'List[int]' = <factory>)

smartbot_irl.data.Pose

Generic pose with position, quaternion orientation, and roll pitch yaw angles.

smartbot_irl.data.LaserScan

Represents a 2D planar laser scan message.

smartbot_irl.data.PoseArray

PoseArray(poses: 'List[Pose]' = <factory>)

smartbot_irl.data.IMU

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)

smartbot_irl.data.Bool

Bool(data: 'bool' = False)

smartbot_irl.data.State

State()

smartbot_irl.data.JointState

JointState(names: 'List[str]' = <factory>, positions: 'List[float]' = <factory>, velocities: 'List[float]' = <factory>)

Function Details#

smartbot_irl.data.list_sensor_columns()[source]#

Return top-level keys from flatten().

Return type:

list[str]

smartbot_irl.data.timestamp()[source]#

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])

classmethod from_ros(msg)[source]#
Parameters:

msg (dict)

to_ros()[source]#
Return type:

dict[str, Any]

marker_ids: List[int]#
poses: List[Pose]#
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: object

Generic 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 Pose from a ROS geometry_msgs/Pose msg.

The method extracts the position and orientation fields, converts the quaternion to roll–pitch–yaw using scipy.spatial.transform.Rotation, and returns a populated Pose.

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/Pose from a ROS Pose msg.

The method extracts the position and orientation fields, then builds a dict matching the ROS2 geometry_msgs/Pose message structure.

Returns:

Dict mirroring ROS2 geometry_msgs/Pose message 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: object

Represents 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

classmethod from_ros(msg)[source]#
Parameters:

msg (dict)

to_ros()[source]#
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])

classmethod from_ros(msg)[source]#
Parameters:

msg (dict)

to_ros()[source]#
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)

classmethod from_ros(msg)[source]#
Parameters:

msg (dict)

to_ros()[source]#
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)

classmethod from_ros(msg)[source]#
Parameters:

msg (dict)

to_ros()[source]#
data: bool = False#
ros_type = 'std_msgs/Bool'#
class smartbot_irl.data.State[source]#

Bases: object

append_row(rowdict)[source]#
Parameters:

rowdict (dict)

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])

classmethod from_ros(msg)[source]#
Parameters:

msg (dict)

to_ros()[source]#
names: List[str]#
positions: List[float]#
ros_type = 'sensor_msgs/JointState'#
velocities: List[float]#