ROS uses yocs_smoother_velocity for speed smoothing

The / cmd_vel topic output by the ROS navigation module move_base specifies the linear velocity and angular velocity planned for the robot, but this output value is still not friendly enough to cause the robot to move smoothly, which requires a smooth process for this output speed value. ROS in yocs_smoother_velocity is a very good speed packet interpolation , can speed, acceleration limit, for preventing the robot speed, speed changes fast or too slow, which is running is smooth. The following specific description to be.

 

1 TOPIC input

~raw_cmd_vel (geometry_msgs/Twist)

  • Input velocity commands. The input velocity value is generally the output topic of move_base / cmd_vel

~odometry (nav_msgs/Odometry)

  • We compare the output velocity commands to "real" velocity to ensure we don't create very big jumps in the velocity profile.

Odometer data, this can be a direct odometer, or an odometer adjusted by posture estimation

~robot_cmd_vel (geometry_msgs/Twist)

  • Alternatively, we can also compare the output velocity commands to end robot velocity commands to ensure we don't create very big jumps in the velocity profile. See robot_feedback parameter description below for more details.

This data is generally the speed value that the base_controller actually sends to the robot motor. Publish this value. Yocs_smoother_velocity can refer to this value to avoid large data fluctuations.

2 TOPIC output

~smooth_cmd_vel (geometry_msgs/Twist)

  • Smoothed output velocity commands respecting velocity and acceleration limits.

Output cmd_vel. Bas_ controller input Topic . Do not use yocs_smoother_velocity words, Base the Controller input is move_base output / cmd_vel, now using / smooth_cmd_vel the

3 Configuration parameters

~accel_lim_v (double)

  • Linear acceleration limit. Mandatory. The maximum value of linear acceleration

~accel_lim_w (double)

  • Angular acceleration limit. Mandatory. Maximum value of angular acceleration

~speed_lim_v (double)

  • Linear velocity limit. Mandatory. The maximum value of linear velocity

~speed_lim_w (double)

  • Angular velocity limit. Mandatory. Maximum angular velocity

~decel_factor (double, default: 1.0)

  • Deceleration/acceleration ratio. Useful to make deceleration more aggressive, for example to safely brake on robots with high inertia.

The reduction or acceleration coefficient is useful when emergency deceleration is required. For example, when a robot with high inertia brakes suddenly, the larger the coefficient, the more effective it is

~frequency (double, default: 20.0)

  • Output messages rate. The velocity smoother keeps it regardless incoming messages rate, interpolating whenever necessary.

The frequency of the output data, regardless of the frequency of the input data, the velocity smoother will maintain this frequency to publish the data

~robot_feedback (int, default: 0)

  • Specifies which topic to use as robot velocity feedback (0 - none, 1 - odometry, 2 - end robot commands). See hints below for more details.

Robot feedback on the published data. For detailed explanation, please refer to the official documentation.

4 Installation and configuration of yocs_velocity_smoother

The installation is very simple, Ubuntu18.04 melodic as an example,

运行sudo apt-get install ros-melodic-yocs_velocity_smoother

 

The configuration example of the Launch file is as follows:

  <include file="$(find yocs_velocity_smoother)/launch/velocity_smoother.launch">

    <arg name="node_name"             value="$(arg node_name)"/>

    <arg name="nodelet_manager_name"  value="$(arg nodelet_manager_name)"/>

    < arg name = "config_file" value = "$ (arg config_file)" /> // yaml file for configuration parameters

    <arg name="raw_cmd_vel_topic"     value="$(arg raw_cmd_vel_topic)"/>

    <arg name="smooth_cmd_vel_topic"  value="$(arg smooth_cmd_vel_topic)"/>

    <arg name="robot_cmd_vel_topic"   value="$(arg robot_cmd_vel_topic)"/>

<arg name="odom_topic"            value="$(arg odom_topic)"/>

</include>

The configuration parameters are in the yaml file format. An example is as follows:

# Example configuration:
# - velocity limits are around a 10% above the physical limits
# - acceleration limits are just low enough to avoid jerking

# Mandatory parameters
speed_lim_v: 0.6
speed_lim_w: 0.5

accel_lim_v: 0.1
accel_lim_w: 0.25

# Optional parameters
frequency: 20.0
decel_factor: 20.0

# Robot velocity feedback type:
#  0 - none
#  1 - odometry
#  2 - end robot commands
robot_feedback: 0

Reference:

http://wiki.ros.org/yocs_velocity_smoother

Published 31 original articles · Like 3 · Visits 2028

Guess you like

Origin blog.csdn.net/lclfans1983/article/details/105444059