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.

Parameters:
  • mode (str)

  • drawing (bool)

Return type:

SmartBotReal | SmartBotSim

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=0.0, wheel_vel_right=0.0, linear_vel=0.0, angular_vel=0.0, gripper_closed=False, manipulator_presets='STOW')[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)

  • wheel_vel_right (float)

  • linear_vel (float)

  • angular_vel (float)

  • gripper_closed (bool)

  • manipulator_presets (str)

to_ros()[source]#

Convert this Command into a dictionary that rosliby can publish.

Return type:

dict

angular_vel: float = 0.0#
gripper_closed: bool = False#
linear_vel: float = 0.0#
manipulator_presets: str = 'STOW'#
wheel_vel_left: float = 0.0#
wheel_vel_right: float = 0.0#