Welcome to Research_Track1_Assignment2’s documentation!
Indices and tables
Research_Track1_Assignment2 documentation!
This is the documentation of the Research_Track1_Assignment2 package!
DefineActionClient
Implementing a Python node that executes an action client, which coordinates the movement of the automaton towards a point specified by the user. The bug_0 algorithm was built with this objective in mind.
- Subscribers:
/pos_and_vel -> The position, linear velocity along the x-axis, and angular velocity about the z-axis of the automaton are obtained and printed via a custom message.
- Publishers:
/odom -> current position, velocity, and additional odometry data of the robot /reaching_goal/result -> Present state of the robot
- Action client topic:
/reaching_goal -> employed to establish communication with the “bug_as” action server.
- scripts.DefineActionClient.default()[source]
Default status of the dictionary used to implement a switch-case structure in the robot_status() function. It corresponds to an error case.
- scripts.DefineActionClient.going_to_goal()[source]
Second status of the dictionary used to implement a switch-case structure in the robot_status() function
- scripts.DefineActionClient.idle()[source]
First status of the dictionary used to implement a switch-case structure in the robot_status() function
TargetPositionService
The last known target position received by the robot is returned via a service provided by a ROS node implemented in this module. The last position received by the node, which is maintained and queried via a ROS service, is subscribed to for target position updates.
- scripts.TargetPositionService.PreviousTargetImplementation(req)[source]
Service handler to provide the last known target position.
- Parameters:
req (LastTargetRequest) – The request object (empty for this service)
- Returns:
The last known target position, if available
- Return type:
LastTargetResponse
TargetDistanceService
This module implements a ROS node that calculates the distance and average velocity of a robot relative to a specified target position. The node subscribes to both the robot’s current position and velocity and a target position, and provides a service that computes the difference in position and average velocity.
- scripts.TargetDistanceService.calc_avg(req)[source]
Service callback function to calculate the average velocity and distance.
- Parameters:
req (MeanRequest) – Service request, not used in this implementation.
- Returns:
The response containing the distance and average velocity.
- Return type:
MeanResponse