NODE head_orientation

This straightforward behaviour simply turns the robot in a target direction. As the other “behavioural” nodes, this continuously read the target from the parameter server and sends to the /cmd_vel topic a angular velocity until the target pose hasn’t been achieved. Nothing more.

This is meant to be used in composite behaviours to implement something more advanced.

Authors

Francesco Ganci (S4143910)

Version:

v1.0.0

head_orientation.active_ = False

general status of the node

head_orientation.clbk_odom(msg)[source]

read the current yaw from the odometry

head_orientation.desired_yaw_ = 'des_yaw'

the yaw to reach, from the parameter server

head_orientation.done()[source]

function called in state 2: stop the robot motion

head_orientation.fix_yaw(des_pos)[source]

the robot tries to reach a given yaw.

this function implements the state zero of the node.

Returns

the absolute head orientation error

head_orientation.head_orient_switch(req)[source]

node switch, service /head_orient_switch

head_orientation.normalize_angle(angle)[source]

the function normalises the angle between -pi and pi

head_orientation.pub = None

cmd_vel publisher

head_orientation.state_ = 0

internal state of the robot

head_orientation.yaw_ = 0

current head orientation of the robot, in radiants

head_orientation.yaw_precision_ = 0.3490658503988659

yaw precision parameter

head_orientation.yaw_precision_2_ = 0.03490658503988659

yaw precision parameter