Download

Move robot a given distance in the X axis.

Description

This state node publishes a velocity command so that the robot moves forward or backward (x direction of base_link frame of the robot) for a set distance. The node utilizes the odometry feedback from the robot. It is also possible to add an acceptable error margin for the distance. The node can also control the minimum and maximum velocity constraint for the robot. The default parameters send a velocity command that moves the robot 1m forward at a maximum velocity of 0.5m/s.

Examples

...

Input List

There are 3 parameters.

Port NameMessage typeCallback
entryTransition [movai_msgs-MovAI/TransitionTo]move_distance_entry.cb
odometryOdometry [nav_msgs-ROS1/Subscriber]move_distance_odometry.cb
timerTimer [movai_msgs-ROS1/Timer]move_distance_timer.cb

Output List

There are 2 parameters.

Port NameMessage type
cmd_velTwist [geometry_msgs-ROS1/Publisher]
exitTransition [movai_msgs-MovAI/TransitionFor]

Parameter List

There are 4 parameters.

ParameterDescription
distance[float] The distance the robot must translate. If the value is negative, the robot moves in the negative x direction of the base_link frame. GGG positive?
distance_error[float] Acceptable distance error in m.
kp[float] proportional constant for the calculation of velocity. The higher the value, the bigger the velocity of the robot in relation to the distance that the robot must traverse.
max_vel[float] Maximum velocity (m/s). The value should always be zero or positive.

More Info