Package level pydoc for smartbot_irl.utils

smartbot_irl#

Functions#

smartbot_irl.SmartBot

Factory that returns a SmartBotReal or SmartBotSim instance.

Classes#

smartbot_irl.SensorData

Container for all SmartBot sensor topics.

smartbot_irl.Command

High-level command for SmartBot.

Function Details#

smartbot_irl.SmartBot(mode: Literal['real'], drawing: bool = False, **kwargs) SmartBotReal[source]#
smartbot_irl.SmartBot(mode: Literal['sim'], drawing: bool = False, **kwargs) SmartBotSim

Factory that returns a SmartBotReal or SmartBotSim instance.

Class Details#

class smartbot_irl.SensorData[source]#

Bases: object

Container for all SmartBot sensor topics. Each field starts as None and becomes a populated message object (LaserScan, Odometry, etc.) once that topic is received.

classmethod initialized()[source]#

Return a new SensorData with all message objects constructed using their default constructors. Useful for simulation environments where we don’t wait for ROS topics to populate.

Return type:

SensorData

flatten()[source]#

Return a partially flattened dict of all sensor fields.

Return type:

dict

to_ros()[source]#

Convert only populated fields to ROS-like dicts.

Return type:

dict

class smartbot_irl.Command(wheel_vel_left=None, wheel_vel_right=None, linear_vel=None, angular_vel=None, gripper_closed=None, manipulator_presets=None)[source]#

Bases: object

High-level command for SmartBot.

Supports both:
  • Differential drive control (linear + angular velocity)

  • Direct wheel velocity control (left/right)

  • Manipulator preset and gripper control

Parameters:
  • wheel_vel_left (float | None)

  • wheel_vel_right (float | None)

  • linear_vel (float | None)

  • angular_vel (float | None)

  • gripper_closed (bool | None)

  • manipulator_presets (str | None)

to_ros()[source]#

Convert this Command into a dictionary that rosliby can publish.

Return type:

dict

angular_vel: float | None = None#
gripper_closed: bool | None = None#
linear_vel: float | None = None#
manipulator_presets: str | None = None#
wheel_vel_left: float | None = None#
wheel_vel_right: float | None = None#