Welcome to Second-Assignment-RT1’s documentation!

Indices and tables

Second Assignment documentation!

This is the documentation of the Second Assignment of RT1.

Node A

details

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

Subscribes to:

/odom

Publish to:

/bot_info /tgt

Services:

goal_info

src.node_a.clbk_odom(msg)[source]

Callback function to publish the desired information taken from /odom.

Args: msg(Odometry): It contains the odometry of the robot

src.node_a.getCordinatesFromConsole()[source]

Function that ask to the user a new targhet. It check if the input given is valid.

src.node_a.get_info_goal(req)[source]

Callback function to return as response the number of traget reached and the one of target canceled.

Args: req(target): the service’s request it does not contain nothing actually.

src.node_a.ltk_tgt(x, y)[source]

Function to publish on /tgt the new target.

Args: x(float) : x position of the new target y(float) : y position of the new target

Node B

details

This node send a request to the service goal_info then it print the response wich contains the number of target canceled and the number of target reached

Services:

goal_info

Node C

details

This node print the robot average speed and the distance from the actual target.

Subscribes to:

/bot_info /tgt

src.node_c.clbk_info(msg)[source]

Callback function to /bot_info

Parameters:

msg (Info) – It contains the avg_vx and avg_vy

src.node_c.clbk_tgt(msg)[source]

Callback function to /tgt

Parameters:

msg (Point) – It contains the coordinates of the target