No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.

motion_velocity_smoother package from autodrrt repo

autonomous_emergency_braking control_performance_analysis control_validator external_cmd_selector joy_controller lane_departure_checker mpc_lateral_controller obstacle_collision_checker operation_mode_transition_manager pid_longitudinal_controller predicted_path_checker pure_pursuit shift_decider trajectory_follower_base trajectory_follower_node vehicle_cmd_gate diagnostic_converter kinematic_evaluator localization_evaluator planning_evaluator ekf_localizer geo_pose_projector gyro_odometer ar_tag_based_localizer landmark_manager localization_error_monitor localization_util ndt_scan_matcher pose2twist pose_initializer pose_instability_detector stop_filter tree_structured_parzen_estimator twist2accel yabloc_common yabloc_image_processing yabloc_monitor yabloc_particle_filter yabloc_pose_initializer map_height_fitter map_loader map_projection_loader map_tf_generator lanelet2_map_preprocessor ros2_bevdet ros2_bevformer bevfusion bytetrack cluster_merger compare_map_segmentation crosswalk_traffic_light_estimator detected_object_feature_remover detected_object_validation detection_by_tracker elevation_map_loader euclidean_cluster front_vehicle_velocity_estimator ground_segmentation heatmap_visualizer image_projection_based_fusion lidar_apollo_instance_segmentation lidar_apollo_segmentation_tvm lidar_apollo_segmentation_tvm_nodes lidar_centerpoint lidar_centerpoint_tvm map_based_prediction multi_object_tracker object_merger object_range_splitter object_velocity_splitter occupancy_grid_map_outlier_filter probabilistic_occupancy_grid_map radar_crossing_objects_noise_filter radar_fusion_to_detected_object radar_object_clustering radar_object_tracker radar_tracks_msgs_converter shape_estimation simple_object_merger tensorrt_classifier tensorrt_yolo tensorrt_yolox tracking_object_merger traffic_light_arbiter traffic_light_classifier traffic_light_fine_detector traffic_light_map_based_detector traffic_light_multi_camera_fusion traffic_light_occlusion_predictor traffic_light_ssd_fine_detector traffic_light_visualization behavior_path_avoidance_by_lane_change_module behavior_path_avoidance_module behavior_path_external_request_lane_change_module behavior_path_goal_planner_module behavior_path_lane_change_module behavior_path_planner behavior_path_planner_common behavior_path_side_shift_module behavior_path_start_planner_module behavior_velocity_blind_spot_module behavior_velocity_crosswalk_module behavior_velocity_detection_area_module behavior_velocity_intersection_module behavior_velocity_no_drivable_lane_module behavior_velocity_no_stopping_area_module behavior_velocity_occlusion_spot_module behavior_velocity_out_of_lane_module behavior_velocity_planner behavior_velocity_planner_common behavior_velocity_run_out_module behavior_velocity_speed_bump_module behavior_velocity_stop_line_module behavior_velocity_template_module behavior_velocity_traffic_light_module behavior_velocity_virtual_traffic_light_module behavior_velocity_walkway_module costmap_generator external_velocity_limit_selector freespace_planner freespace_planning_algorithms mission_planner motion_velocity_smoother objects_of_interest_marker_interface obstacle_avoidance_planner obstacle_cruise_planner obstacle_stop_planner obstacle_velocity_limiter path_smoother planning_debug_tools planning_test_utils planning_topic_converter planning_validator route_handler rtc_interface rtc_replayer bezier_sampler frenet_planner path_sampler sampler_common scenario_selector static_centerline_optimizer surround_obstacle_checker gnss_poser image_diagnostics image_transport_decompressor imu_corrector livox_tag_filter pointcloud_preprocessor radar_scan_to_pointcloud2 radar_static_pointcloud_filter radar_threshold_filter radar_tracks_noise_filter tier4_pcl_extensions vehicle_velocity_converter autoware_auto_msgs_adapter bluetooth_monitor component_state_monitor default_ad_api ad_api_adaptors ad_api_visualizers automatic_pose_initializer diagnostic_graph_aggregator dummy_diag_publisher dummy_infrastructure duplicated_node_checker emergency_handler mrm_comfortable_stop_operator mrm_emergency_stop_operator system_error_monitor system_monitor topic_state_monitor velodyne_monitor accel_brake_map_calibrator external_cmd_converter raw_vehicle_cmd_converter steer_offset_estimator vehicle_info_util launch launch_ros autoware_ad_api_specs autoware_adapi_v1_msgs autoware_adapi_version_msgs autoware_auto_common autoware_auto_geometry autoware_auto_control_msgs autoware_auto_geometry_msgs autoware_auto_mapping_msgs autoware_auto_msgs autoware_auto_perception_msgs autoware_auto_planning_msgs autoware_auto_system_msgs autoware_auto_vehicle_msgs autoware_auto_perception_rviz_plugin autoware_auto_tf2 autoware_cmake autoware_lint_common autoware_utils lanelet2_extension autoware_common_msgs autoware_control_msgs autoware_localization_msgs autoware_map_msgs autoware_perception_msgs autoware_planning_msgs autoware_sensing_msgs autoware_system_msgs autoware_vehicle_msgs autoware_point_types autoware_testing bag_time_manager_rviz_plugin component_interface_specs component_interface_tools component_interface_utils cuda_utils fake_test_node geography_utils global_parameter_loader glog_component goal_distance_calculator grid_map_utils interpolation kalman_filter motion_utils object_recognition_utils osqp_interface path_distance_calculator perception_utils polar_grid qp_interface rtc_manager_rviz_plugin signal_processing tensorrt_common tier4_adapi_rviz_plugin tier4_api_utils tier4_automatic_goal_rviz_plugin tier4_autoware_utils tier4_calibration_rviz_plugin tier4_camera_view_rviz_plugin tier4_control_rviz_plugin tier4_datetime_rviz_plugin tier4_debug_rviz_plugin tier4_debug_tools tier4_localization_rviz_plugin tier4_perception_rviz_plugin tier4_planning_rviz_plugin tier4_screen_capture_rviz_plugin tier4_simulated_clock_rviz_plugin tier4_state_rviz_plugin tier4_system_rviz_plugin tier4_target_object_type_rviz_plugin tier4_traffic_light_rviz_plugin tier4_vehicle_rviz_plugin time_utils simulator_compatibility_test traffic_light_recognition_marker_publisher traffic_light_utils tvm_utility dma_customer_msg dma_transfer eagleye_coordinate eagleye_navigation eagleye_msgs eagleye_rt eagleye_can_velocity_converter eagleye_fix2kml eagleye_geo_pose_converter eagleye_geo_pose_fusion eagleye_gnss_converter eagleye_tf llh_converter morai_msgs mussp ndt_omp orocos_kdl python_orocos_kdl pointcloud_to_laserscan rtklib_bridge rtklib_msgs autoware_external_api_msgs autoware_iv_external_api_adaptor autoware_iv_internal_api_adaptor awapi_awiv_adapter tier4_api_msgs tier4_auto_msgs_converter tier4_control_msgs tier4_debug_msgs tier4_external_api_msgs tier4_hmi_msgs tier4_localization_msgs tier4_map_msgs tier4_perception_msgs tier4_planning_msgs tier4_rtc_msgs tier4_simulation_msgs tier4_system_msgs tier4_v2x_msgs tier4_vehicle_msgs io_opt tier4_autoware_api_launch tier4_control_launch tier4_localization_launch tier4_map_launch tier4_perception_launch tier4_planning_launch tier4_sensing_launch tier4_simulator_launch tier4_system_launch tier4_vehicle_launch fastrtps cyclonedds lanelet2 lanelet2_core lanelet2_examples lanelet2_io lanelet2_maps lanelet2_matching lanelet2_projection lanelet2_python lanelet2_routing lanelet2_traffic_rules lanelet2_validation sophus angles behaviortree_cpp_v3 bond bond_core bondcpp bondpy smclib test_bond cudnn_cmake_module diagnostic_aggregator diagnostic_common_diagnostics diagnostic_updater diagnostics self_test filters geodesy geographic_info geographic_msgs grid_map grid_map_cmake_helpers grid_map_core grid_map_costmap_2d grid_map_cv grid_map_demos grid_map_filters grid_map_loader grid_map_msgs grid_map_octomap grid_map_pcl grid_map_ros grid_map_rviz_plugin grid_map_sdf grid_map_visualization mrt_cmake_modules nav2_amcl nav2_behavior_tree nav2_behaviors nav2_bringup nav2_bt_navigator nav2_collision_monitor nav2_common nav2_controller nav2_core nav2_costmap_2d costmap_queue dwb_core dwb_critics dwb_msgs dwb_plugins nav2_dwb_controller nav_2d_msgs nav_2d_utils nav2_lifecycle_manager nav2_map_server nav2_msgs nav2_navfn_planner nav2_planner nav2_regulated_pure_pursuit_controller nav2_rotation_shim_controller nav2_rviz_plugins nav2_simple_commander nav2_smac_planner nav2_smoother nav2_system_tests nav2_theta_star_planner nav2_util nav2_velocity_smoother nav2_voxel_grid nav2_waypoint_follower navigation2 dynamic_edt_3d octomap octovis octomap_msgs osqp_vendor pacmod3_msgs pcl_msgs pcl_conversions pcl_ros perception_pcl point_cloud_msg_wrapper radar_msgs can_msgs rqt_tf_tree tensorrt_cmake_module topic_tools topic_tools_interfaces tvm_vendor cv_bridge image_geometry opencv_tests vision_opencv xacro rviz2 rviz_assimp_vendor rviz_common rviz_default_plugins rviz_ogre_vendor rviz_rendering rviz_rendering_tests rviz_visual_testing_framework dummy_perception_publisher fault_injection simple_planning_simulator classformsg node_v2x image_view v4l2_camera can_interface_custom cgi430_can_driver cgi610_driver ARS408_driver data_format_dump data_preprocess_launch lidar_centerpoint_collect lidar_saver message_sync time_cal camera_calibration direct_visual_lidar_calibration multi_lidar_calibration

Package Summary

Tags No category tags.
Version 0.1.0
License Apache License 2.0
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ieiauto/autodrrt.git
VCS Type git
VCS Version main
Last Updated 2024-09-19
Dev Status UNMAINTAINED
CI status No Continuous Integration
Released UNRELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

The motion_velocity_smoother package

Additional Links

No additional links.

Maintainers

  • Fumiya Watanabe
  • Takamasa Horibe
  • Makoto Kurihara

Authors

  • Takamasa Horibe
  • Fumiya Watanabe
  • Yutaka Shimizu
  • Makoto Kurihara

Motion Velocity Smoother

Purpose

motion_velocity_smoother outputs a desired velocity profile on a reference trajectory. This module plans a velocity profile within the limitations of the velocity, the acceleration and the jerk to realize both the maximization of velocity and the ride quality. We call this module motion_velocity_smoother because the limitations of the acceleration and the jerk means the smoothness of the velocity profile.

Inner-workings / Algorithms

Flow chart

motion_velocity_smoother_flow

Extract trajectory

For the point on the reference trajectory closest to the center of the rear wheel axle of the vehicle, it extracts the reference path between extract_behind_dist behind and extract_ahead_dist ahead.

Apply external velocity limit

It applies the velocity limit input from the external of motion_velocity_smoother. Remark that the external velocity limit is different from the velocity limit already set on the map and the reference trajectory. The external velocity is applied at the position that it is able to reach the velocity limit with the deceleration and the jerk constraints set as the parameter.

Apply stop approaching velocity

It applies the velocity limit near the stopping point. This function is used to approach near the obstacle or improve the accuracy of stopping.

Apply lateral acceleration limit

It applies the velocity limit to decelerate at the curve. It calculates the velocity limit from the curvature of the reference trajectory and the maximum lateral acceleration max_lateral_accel. The velocity limit is set as not to fall under min_curve_velocity.

Note: velocity limit that requests larger than nominal.jerk is not applied. In other words, even if a sharp curve is planned just in front of the ego, no deceleration is performed.

Apply steering rate limit

It calculates the desired steering angles of trajectory points. and it applies the steering rate limit. If the (steering_angle_rate > max_steering_angle_rate), it decreases the velocity of the trajectory point to acceptable velocity.

Resample trajectory

It resamples the points on the reference trajectory with designated time interval. Note that the range of the length of the trajectory is set between min_trajectory_length and max_trajectory_length, and the distance between two points is longer than min_trajectory_interval_distance. It samples densely up to the distance traveled between resample_time with the current velocity, then samples sparsely after that. By sampling according to the velocity, both calculation load and accuracy are achieved since it samples finely at low velocity and coarsely at high velocity.

Calculate initial state

Calculate initial values for velocity planning. The initial values are calculated according to the situation as shown in the following table.

Situation Initial velocity Initial acceleration
First calculation Current velocity 0.0
Engaging engage_velocity engage_acceleration
Deviate between the planned velocity and the current velocity Current velocity Previous planned value
Normal Previous planned value Previous planned value

Smooth velocity

It plans the velocity. The algorithm of velocity planning is chosen from JerkFiltered, L2 and Linf, and it is set in the launch file. In these algorithms, they use OSQP[1] as the solver of the optimization.

JerkFiltered

It minimizes the sum of the minus of the square of the velocity and the square of the violation of the velocity limit, the acceleration limit and the jerk limit.

L2

It minimizes the sum of the minus of the square of the velocity, the square of the the pseudo-jerk[2] and the square of the violation of the velocity limit and the acceleration limit.

Linf

It minimizes the sum of the minus of the square of the velocity, the maximum absolute value of the the pseudo-jerk[2] and the square of the violation of the velocity limit and the acceleration limit.

Post process

It performs the post-process of the planned velocity.

  • Set zero velocity ahead of the stopping point
  • Set maximum velocity given in the config named max_velocity
  • Set velocity behind the current pose
  • Resample trajectory (post resampling)
  • Output debug data

After the optimization, a resampling called post resampling is performed before passing the optimized trajectory to the next node. Since the required path interval from optimization may be different from the one for the next module, post resampling helps to fill this gap. Therefore, in post resampling, it is necessary to check the path specification of the following module to determine the parameters. Note that if the computational load of the optimization algorithm is high and the path interval is sparser than the path specification of the following module in the first resampling, post resampling would resample the trajectory densely. On the other hand, if the computational load of the optimization algorithm is small and the path interval is denser than the path specification of the following module in the first resampling, the path is sparsely resampled according to the specification of the following module.

Inputs / Outputs

Input

Name Type Description
~/input/trajectory autoware_auto_planning_msgs/Trajectory Reference trajectory
/planning/scenario_planning/max_velocity std_msgs/Float32 External velocity limit [m/s]
/localization/kinematic_state nav_msgs/Odometry Current odometry
/tf tf2_msgs/TFMessage TF
/tf_static tf2_msgs/TFMessage TF static

Output

Name Type Description
~/output/trajectory autoware_auto_planning_msgs/Trajectory Modified trajectory
/planning/scenario_planning/current_max_velocity std_msgs/Float32 Current external velocity limit [m/s]
~/closest_velocity std_msgs/Float32 Planned velocity closest to ego base_link (for debug)
~/closest_acceleration std_msgs/Float32 Planned acceleration closest to ego base_link (for debug)
~/closest_jerk std_msgs/Float32 Planned jerk closest to ego base_link (for debug)
~/debug/trajectory_raw autoware_auto_planning_msgs/Trajectory Extracted trajectory (for debug)
~/debug/trajectory_external_velocity_limited autoware_auto_planning_msgs/Trajectory External velocity limited trajectory (for debug)
~/debug/trajectory_lateral_acc_filtered autoware_auto_planning_msgs/Trajectory Lateral acceleration limit filtered trajectory (for debug)
~/debug/trajectory_steering_rate_limited autoware_auto_planning_msgs/Trajectory Steering angle rate limit filtered trajectory (for debug)
~/debug/trajectory_time_resampled autoware_auto_planning_msgs/Trajectory Time resampled trajectory (for debug)
~/distance_to_stopline std_msgs/Float32 Distance to stop line from current ego pose (max 50 m) (for debug)
~/stop_speed_exceeded std_msgs/Bool It publishes true if planned velocity on the point which the maximum velocity is zero is over threshold

Parameters

Constraint parameters

Name Type Description Default value
max_velocity double Max velocity limit [m/s] 20.0
max_accel double Max acceleration limit [m/ss] 1.0
min_decel double Min deceleration limit [m/ss] -0.5
stop_decel double Stop deceleration value at a stop point [m/ss] 0.0
max_jerk double Max jerk limit [m/sss] 1.0
min_jerk double Min jerk limit [m/sss] -0.5

External velocity limit parameter

Name Type Description Default value
margin_to_insert_external_velocity_limit double margin distance to insert external velocity limit [m] 0.3

Curve parameters

Name Type Description Default value
enable_lateral_acc_limit bool To toggle the lateral acceleration filter on and off. You can switch it dynamically at runtime. true
max_lateral_accel double Max lateral acceleration limit [m/ss] 0.5
min_curve_velocity double Min velocity at lateral acceleration limit [m/ss] 2.74
decel_distance_before_curve double Distance to slowdown before a curve for lateral acceleration limit [m] 3.5
decel_distance_after_curve double Distance to slowdown after a curve for lateral acceleration limit [m] 2.0
min_decel_for_lateral_acc_lim_filter double Deceleration limit to avoid sudden braking by the lateral acceleration filter [m/ss]. Strong limitation degrades the deceleration response to the appearance of sharp curves due to obstacle avoidance, etc. -2.5

Engage & replan parameters

Name Type Description Default value
replan_vel_deviation double Velocity deviation to replan initial velocity [m/s] 5.53
engage_velocity double Engage velocity threshold [m/s] (if the trajectory velocity is higher than this value, use this velocity for engage vehicle speed) 0.25
engage_acceleration double Engage acceleration [m/ss] (use this acceleration when engagement) 0.1
engage_exit_ratio double Exit engage sequence to normal velocity planning when the velocity exceeds engage_exit_ratio x engage_velocity. 0.5
stop_dist_to_prohibit_engage double If the stop point is in this distance, the speed is set to 0 not to move the vehicle [m] 0.5

Stopping velocity parameters

Name Type Description Default value
stopping_velocity double change target velocity to this value before v=0 point [m/s] 2.778
stopping_distance double distance for the stopping_velocity [m]. 0 means the stopping velocity is not applied. 0.0

Extraction parameters

Name Type Description Default value
extract_ahead_dist double Forward trajectory distance used for planning [m] 200.0
extract_behind_dist double backward trajectory distance used for planning [m] 5.0
delta_yaw_threshold double Allowed delta yaw between ego pose and trajectory pose [radian] 1.0472

Resampling parameters

Name Type Description Default value
max_trajectory_length double Max trajectory length for resampling [m] 200.0
min_trajectory_length double Min trajectory length for resampling [m] 30.0
resample_time double Resample total time [s] 10.0
dense_dt double resample time interval for dense sampling [s] 0.1
dense_min_interval_distance double minimum points-interval length for dense sampling [m] 0.1
sparse_dt double resample time interval for sparse sampling [s] 0.5
sparse_min_interval_distance double minimum points-interval length for sparse sampling [m] 4.0

Resampling parameters for post process

Name Type Description Default value
post_max_trajectory_length double max trajectory length for resampling [m] 300.0
post_min_trajectory_length double min trajectory length for resampling [m] 30.0
post_resample_time double resample total time for dense sampling [s] 10.0
post_dense_dt double resample time interval for dense sampling [s] 0.1
post_dense_min_interval_distance double minimum points-interval length for dense sampling [m] 0.1
post_sparse_dt double resample time interval for sparse sampling [s] 0.1
post_sparse_min_interval_distance double minimum points-interval length for sparse sampling [m] 1.0

Limit steering angle rate parameters

Name Type Description Default value
enable_steering_rate_limit bool To toggle the steer rate filter on and off. You can switch it dynamically at runtime. true
max_steering_angle_rate double Maximum steering angle rate [degree/s] 40.0
resample_ds double Distance between trajectory points [m] 0.1
curvature_threshold double If curvature > curvature_threshold, steeringRateLimit is triggered [1/m] 0.02
curvature_calculation_distance double Distance of points while curvature is calculating [m] 1.0

Weights for optimization

JerkFiltered

Name Type Description Default value
jerk_weight double Weight for “smoothness” cost for jerk 10.0
over_v_weight double Weight for “over speed limit” cost 100000.0
over_a_weight double Weight for “over accel limit” cost 5000.0
over_j_weight double Weight for “over jerk limit” cost 1000.0

L2

Name Type Description Default value
pseudo_jerk_weight double Weight for “smoothness” cost 100.0
over_v_weight double Weight for “over speed limit” cost 100000.0
over_a_weight double Weight for “over accel limit” cost 1000.0

Linf

Name Type Description Default value
pseudo_jerk_weight double Weight for “smoothness” cost 100.0
over_v_weight double Weight for “over speed limit” cost 100000.0
over_a_weight double Weight for “over accel limit” cost 1000.0

Others

Name Type Description Default value
over_stop_velocity_warn_thr double Threshold to judge that the optimized velocity exceeds the input velocity on the stop point [m/s] 1.389

Assumptions / Known limits

  • Assume that the velocity limit or the stopping point is properly set at the point on the reference trajectory
  • If the velocity limit set in the reference path cannot be achieved by the designated constraints of the deceleration and the jerk, decelerate while suppressing the velocity, the acceleration and the jerk deviation as much as possible
  • The importance of the deviations is set in the config file

(Optional) Error detection and handling

(Optional) Performance characterization

[1] B. Stellato, et al., “OSQP: an operator splitting solver for quadratic programs”, Mathematical Programming Computation, 2020, 10.1007/s12532-020-00179-2.

[2] Y. Zhang, et al., “Toward a More Complete, Flexible, and Safer Speed Planning for Autonomous Driving via Convex Optimization”, Sensors, vol. 18, no. 7, p. 2185, 2018, 10.3390/s18072185

(Optional) Future extensions / Unimplemented parts

CHANGELOG
No CHANGELOG found.

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

  • launch/motion_velocity_smoother.launch.xml
      • common_param_path [default: $(find-pkg-share motion_velocity_smoother)/config/default_common.param.yaml]
      • nearest_search_param_path
      • input_trajectory [default: /planning/scenario_planning/scenario_selector/trajectory]
      • output_trajectory [default: /planning/scenario_planning/trajectory]
      • publish_debug_trajs [default: false]
      • velocity_smoother_type [default: JerkFiltered]
      • param_path [default: $(find-pkg-share motion_velocity_smoother)/config/default_motion_velocity_smoother.param.yaml]
      • velocity_smoother_param_path [default: $(find-pkg-share motion_velocity_smoother)/config/$(var velocity_smoother_type).param.yaml]

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged motion_velocity_smoother at Robotics Stack Exchange

No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.