Robot states Node

Brief explanation of this node:

This node has main function to set_pose and get_pose. Use service to generate data and communicate with other node and also set the initial pose of robot use parameters.

Service:

GET_POSE SET_POSE

Param:

Get param from ‘/state/initial_pose’

class scripts.robot_states.RobotState[source]
The node manager class:

This class defines two services to get and set the current robot pose and next robot pose.

get_pose(request)[source]

This function is the robot/get_pose service implementation. The request input parameter is given by the client as empty. Thus, it is not used. The response returned to the client contains the current robot pose.

Parameters

request (float) – [x,y] coordinates of client pose

Returns

get position response

Return type

float

set_pose(request)[source]

This function is the robot/set_pose service implementation. The request input parameter is the current robot pose to be set, as given by the client. This server returns an empty response.

Parameters

request (float) – [x,y] coordinates of client pose

Returns

set postion response

Return type

float