Download

move_distance

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 Name

Message type

Callback

entry

Transition [movai_msgs-MovAI/TransitionTo][movai_msgs-MovAI/TransitionTo]

move_distance_entry.cb

odometry

Odometry [nav_msgs-ROS1/Subscriber][nav_msgs-ROS1/Subscriber]

move_distance_odometry.cb

timer

Timer [movai_msgs-ROS1/Timer][movai_msgs-ROS1/Timer]

move_distance_timer.cb

Output List

There are 2 parameters.

Port Name

Message type

cmd_vel

Twist [geometry_msgs-ROS1/Publisher][geometry_msgs-ROS1/Publisher]

exit

Transition [movai_msgs-MovAI/TransitionFor][movai_msgs-MovAI/TransitionFor]

Parameter List

There are 4 parameters.

Parameter

Description

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