Welcome to ResearchTrackI_Assignment2 documentation!

Indices and tables

NodeA Module

A more detailed description of the node:

This node implements an action client allowing the user to set a target (x,y) or to cancel it at any time. Also it publishes the robot position and velocity as a custom message by reling on the topic /odom.

Subsribes to:

/odom

Publishes to:

/pos_vel

scripts.NodeA.callback(msg)[source]

Callback function to publish position and velocity of the robot taken from /odom topic

Args: msg(Odometry): Contains the odometry of the robot

scripts.NodeA.cancel_target()[source]

Function that checks whether there is an active goal and allows to cancel it

Args: None

scripts.NodeA.get_target()[source]

Function that ask the user to set the x and y position of the target and check whether the input is valid

Args: None

scripts.NodeA.set_target()[source]

Function that allows the user to set the coordinates (x, y) of the target position that the robot must reach inside the simulation environment and send the target (goal) to the action server

Args: None

scripts.NodeA.user_interface()[source]

User Interface (UI) The function is called at the start of the program The user can choose to set a goal, to cancel it or to exit the program by entering the correct number

Args: None

NodeB Module

A more detailed description of the node:

This node prints the number of target canceled and the number of target reached

Subsribes to:

/reaching_goal/result

scripts.NodeB.status(msg)[source]

Function that updates the number of goals reached or cancelled based on the status

Args: msg

NodeC Module

A more detailed description of the node:

This node prints the robot speed and the distance from the desired target

Subsribes to:

/pos_vel

scripts.NodeC.callback_subscriber(msg)[source]

Function that calculates the distance between the robot and the goal and the speed of the robot

Args: msg(RobotMsg): Contains the coordinates and velocity of the robot