Welcome to RT2-first’s documentation!
Indices and tables
Research_Track_assignment’s documentation!
This is the documentation of the Research_Track1_assignment!
—
node_a
Node A orchestrates target setting and motion control. It integrates an action client for setting navigation targets and publishes real-time kinematic data, including position and velocity, derived from the robot’s odometry.
This node implements an action client that allows the user to set or cancel navigation goals. It also publishes the robot’s position and velocity on the /pos_vel topic using a custom message.
- Subscribers:
/odom (nav_msgs/Odometry): Receives odometry data from the robot.
- Publishers:
/pos_vel (assignment_2_2023/Vel): Publishes current position and velocity.
- Action Clients:
/reaching_goal (PlanningAction): Sends goals to be reached by the robot.
- class scripts.node_a.GoalHandler[source]
Bases:
objectA class to handle user interaction for sending or canceling navigation goals, and publishing the robot’s current position and velocity.
—
node_b
Node B serves as a memory bank for the system, offering a service to recall the last target position set by the user. It efficiently retrieves and delivers this historical data upon request, ensuring seamless continuity in navigation tasks.
This node implements a ROS service that provides the last goal (x, y) set by the user via ROS parameters.
- Services:
/input (assignment_2_2023/Input): Returns the most recent target coordinates from the parameter server.
- class scripts.node_b.LastTargetService[source]
Bases:
objectA class that handles a ROS service to return the last user-defined target position.
- result_callback(request)[source]
Service callback to retrieve and return the last target position.
- Parameters:
request (assignment_2_2023.srv.Input) – The service request (not used).
- Returns:
Contains the x and y values of the last target from the ROS parameter server.
- Return type:
assignment_2_2023.srv.InputResponse
—
node_c
Node C serves as an analytical hub, dynamically computing the average velocity and tracking the distance to the last target position. By processing real-time velocity data and leveraging historical target positions, it provides valuable insights for fine-tuning robot navigation strategies.
This node subscribes to /pos_vel and calculates: - The average velocity of the robot - The distance to the last goal position
- Services:
/info_service (assignment_2_2023/Ave_pos_vel): Returns the above information.
- class scripts.node_c.InfoService[source]
Bases:
objectA class to compute and serve the robot’s distance to its target and average linear velocity.
- get_distance_and_average_velocity(msg)[source]
Callback for the /pos_vel topic. Computes the distance to goal and average velocity.
- Parameters:
msg (assignment_2_2023.msg.Vel) – Contains the robot’s position and velocity.