Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add 'obstacle_velocity_limiter' package (#1579)
* Initial commit with barebone SafeVelocityAdjustorNode Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add debug topics, launch file, and config file Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix debug markers Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix dynamic parameters Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add proper collision detection and debug footprint Implements Proposal 1. Calculation of the adjusted velocity still needs to be improved Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add script to compare the original and adjusted velocity profiles Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix calculation of distance to obstacle Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add test for calculation collision distance Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add launch file to test the safe_velocity_adjustor with a bag Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Cleanup code and add tests for forwardSimulatedVector Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Simplify collision detection by not using a footprint polygon Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add filtering of the dynamic objects from the pointcloud Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * [DEBUG] Print runtimes of expensive functions Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add trajectory downsampling to boost performance + improve debug markers Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Modify velocity only from ego pose + distance parameter Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add 1st Eigen version of distanceToClosestCollision + benchmark Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Switch to using contours from occupancy grid for collision checking Filtering of dynamic objects is not great Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add buffer around dynamic obstacles to avoid false obstacle detection Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add parameter to limit the adjusted velocity Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Use vehicle_info_util to get vehicle footprint Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Calculate accurate distance to collision + add tests Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add parameter for the min velocity where a dynamic obstacle is ignored Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add README and some pictures to explain the node inner workings Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update scenario_planning.launch.xml to run the new node Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix format of launch files Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update launcher and rviz config used for debuging with bag Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Cleanup debug publishing Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Complete tests of collision_distance.hpp Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add docstring + Small code cleanup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Improve test of occupancy_grid_utils Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix bug when setting parameter callback before getting vehicle parameters Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Rename safe_velocity_adjustor to apparent_safe_velocity_limiter Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Move declarations to cpp file (apparent_safe_velocity_limiter_node) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Move declarations to cpp file (occupancy_grid_utils) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Move declarations to cpp file (collision_distance) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add exec of trajectory_visualizer.py in launch files Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Mask trajectory footprint from the occupancy grid (might be expensive) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Filter out the occupancy grid that is outside the envelope polygon Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add improved PolygonIterator using scan line algorithm Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Use autoware_cmake for dependencies Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Improve performances of PolygonIterator Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Minor cleanup of PolygonIterator Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Use improved iterator + add benchmark (max/avg/med) to node Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Minor code cleanup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Switch from set to vector/list in PolygonIterator Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Remove PolygonIterator and use implementation from grid_map_utils Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add parameter to limit deceleration when adjusting the velocity Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Code cleanup, move type decl and debug functions to separate files Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add support for collision detection using pointcloud Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Code cleanup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Speedup pointcloud filtering (still ~100ms on bags) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Improve envelope calculation and use separate node for pcd downsampling Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add ProjectionParameters to prepare for the bicycle model projection Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add bicycle projection with various steering offsets Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update docstring Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Major refactoring, calculate envelope from footprints Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add extraction of static obstacles from lanelet map Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Remove stopwatch Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add arc distance calculation when using bicycle projection Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix multi geometry definitions in tier4_autoware_utils/boost_geometry Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Improve geometry operations to take advantage of Eigen Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Switch to min/max offset and simplify footprint calculations Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix unit tests (unset params.heading) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add option to filter obstacles using the safety envelope Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix bug with distance calculation and improve debug markers Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update README Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add parameter to set map obstacles by linestring id (for debug) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Move param structures to dedicated file and add PreprocessingParameters Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add parameter to calculate steering angle of trajectory points Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Cleanup footprint generation Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix bug with debug marker ids Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix bug where the VelocityParameters were not constructed Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update obstacles extraction Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Minor code cleanup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Switch to collision detection using rtree Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add publishing of the runtime (in microseconds) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add option to ignore obstacles on the trajectory Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add max length and max duration parameters Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Restructure Obstacles structure to separate lines and points for speedup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Convert obstacle linestrings to segments when used in the rtree Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add parameter for extra distance when filtering the ego path Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix issues caused by rebase Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Minor code cleanup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update to run with looping bag replay Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add debug markers for obstacle masks and only publish when subscribed Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update README Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Fix humble build issue with PCL library Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update obstacle extraction from lanelet map (no longer based on route) Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Optimize use of rtree + use naive collision checking with few obstacles Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Remove debug code and update default parameters Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Do not wait for self pose Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Rename to obstacle_velocity_limiter Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * More minor cleanup Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update READEME.md Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update README to have the purpose written before the illustration Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update copyright notice: Tier IV -> TIER IV Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Remove use_sim_time param from node launch file Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Update launch files to run in the motion_planner + add launch config Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
- Loading branch information