Multi-Mobile Robot System

Introduction

  • Introduction

Packages

  • Controller package
  • Map server package
  • Messages package
  • Navigator package
    • API Reference
      • NavigationError
      • NavigationRejectionError
      • Navigator
        • Navigator._ask_for_permission_async()
        • Navigator._ask_for_permission_sync()
        • Navigator._extract_initial_pose_from_params()
        • Navigator._navigate_single_segment()
        • Navigator._release_resources_async()
        • Navigator._release_resources_sync()
        • Navigator._wait_for_permission()
        • Navigator.calculate_path_through_poses_callback()
        • Navigator.calculate_path_to_pose_callback()
        • Navigator.interpolate_and_smooth_path()
        • Navigator.navigate_cancel_callback()
        • Navigator.navigate_execute_callback()
        • Navigator.navigate_goal_callback()
        • Navigator.publish_alive()
        • Navigator.register_in_controller()
        • Navigator.update_position()
      • main()
      • calculate_orientation_to_next_point()
      • interpolate_path()
      • smooth_path_orientations()
  • Simulation package
Multi-Mobile Robot System
  • Navigator package
  • View page source

Navigator package

Some description.

API Reference

Navigator node for the multi mobile robot system.

Navigates single robot. Asks controller whether a robot can move forward, or it should wait for another robot.

exception mmrs_navigator.navigator.NavigationError

Base class for navigation errors.

exception mmrs_navigator.navigator.NavigationRejectionError

Error for rejected navigation.

class mmrs_navigator.navigator.Navigator(node_name: str = 'navigator', namespace: str = '')

Navigator node for the multi mobile robot system.

_ask_for_permission_async(previous_id: UUID, current_id: UUID, *, first: bool = False) → Future

Ask for permission to enter next segment.

Parameters:
  • prevoius_id – The ID of the previous segment.

  • current_id – The ID of the current segment.

  • first – Whether this is the first segment.

Returns:

The future of the service call.

_ask_for_permission_sync(previous_id: UUID, current_id: UUID, *, first: bool = False) → bool

Ask for permission to enter next segment.

Parameters:
  • namespace – The namespace of the robot.

  • previous_id – The ID of the previous segment.

  • current_id – The ID of the current segment.

Returns:

True if permission is granted, False if not.

_extract_initial_pose_from_params() → PoseStamped

Extract initial pose from parameters.

Returns:

The initial pose.

_navigate_single_segment(goal_handle: ServerGoalHandle, segment: PathSegment) → int

Navigate robot through a single segment.

Parameters:
  • goal_handle – The goal handle for the navigate action.

  • segment – The segment to navigate through.

Returns:

The result of the navigation.

_release_resources_async(segment: PathSegment) → Future

Release resources after navigating through a segment.

Parameters:

segment – The segment that was navigated through.

_release_resources_sync(segment: PathSegment) → None

Release resources after navigating through a segment.

Parameters:

segment – The segment that was navigated through.

_wait_for_permission(previous_id: UUID, current_id: UUID) → None

Wait for permission to enter next segment.

Parameters:
  • previous_id – ID of the previous segment.

  • current_id – ID of the current segment.

calculate_path_through_poses_callback(request: CalculatePathThroughPoses_Request, response: CalculatePathThroughPoses_Response) → CalculatePathThroughPoses_Response

Calculate a path through poses’ callback.

Parameters:
  • request – The request to calculate a path through poses.

  • response – The response of the service.

Returns:

The response of the service.

calculate_path_to_pose_callback(request: CalculatePath_Request, response: CalculatePath_Response) → CalculatePath_Response

Calculate a path to a pose’s callback.

Parameters:
  • request – The request to calculate a path to a pose.

  • response – The response of the service.

Returns:

The response of the service.

interpolate_and_smooth_path(path: Path, *, interpolation_distance: float) → Path

Interpolate and smooth path orientations.

Parameters:
  • path – The path to be interpolated and smoothed.

  • interpolation_distance – The maximum distance between points.

Returns:

The interpolated and smoothed path.

navigate_cancel_callback(goal_handle: ServerGoalHandle) → CancelResponse

Navigate through poses’ cancel callback.

Parameters:

goal_handle – The goal handle to cancel.

Returns:

The response to the cancel request.

navigate_execute_callback(goal_handle: ServerGoalHandle) → Navigate_Result

The execute callback for the navigate action.

Parameters:

goal_handle – The goal handle for the navigate action.

Returns:

The result of the navigate action.

navigate_goal_callback(goal: Navigate_Goal) → GoalResponse

Navigate through poses’ goal callback.

Always accepts the goal.

Parameters:

goal – The goal handle to accept or reject.

Returns:

The response to the goal.

publish_alive() → None

Publish alive message.

register_in_controller(metadata: RobotMetadata) → None

Register robot in centralized controller.

Parameters:
  • namespace – The namespace of the robot.

  • metadata – The metadata of the robot.

update_position(msg: PoseWithCovarianceStamped) → None

Update the robot position. :param msg: The message with the pose.

mmrs_navigator.navigator.main(args: list[str] | None = None) → None

Run navigator node.

Path transformations module.

mmrs_navigator.path_transformations.calculate_orientation_to_next_point(current_point: Point, next_point: Point) → Quaternion

Calculate the orientation of the current point to the next point.

Parameters:
  • current_point – The current point.

  • next_point – The next point.

Returns:

The orientation of the current point to the next point.

mmrs_navigator.path_transformations.interpolate_path(path: Path, interpolation_distance: float) → Path

Interpolate the path to increase poses density.

Parameters:
  • path – The path to interpolate.

  • interpolation_distance – The maximum distance between poses.

Returns:

The interpolated path.

mmrs_navigator.path_transformations.smooth_path_orientations(path: Path) → Path

Smooth the orientations of the path’s poses.

Iterates over the poses of the path and calculates the orientation to the next point, then updates the orientation of the current pose.

Parameters:

path – The path to smooth.

Returns:

The smoothed path.

Previous Next

© Copyright 2024, Jakub Kozłowicz.

Built with Sphinx using a theme provided by Read the Docs.