Skip to content

Commit

Permalink
feat: add vehicle cmd gate package (autowarefoundation#75)
Browse files Browse the repository at this point in the history
* release v0.4.0

* remove ROS1 packages temporarily

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* add sample ros2 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* remove ROS1 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Revert "remove ROS1 packages temporarily"

This reverts commit 2a28a5337292877f9d5cb33e083626930c170ff1.

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* add COLCON_IGNORE to ros1 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Port vehicle_cmd_gate to ROS2 (#3)

* Port vehicle_cmd_gate to ROS2

* Sim-time-respecting timer

* fix duration unit for RCLCPP_*_THROTTLE (autowarefoundation#75)

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Rename h files to hpp (autowarefoundation#142)

* Change includes

* Rename files

* Adjustments to make things compile

* Other packages

* Adjust copyright notice on 532 out of 699 source files (autowarefoundation#143)

* Use quotes for includes where appropriate (autowarefoundation#144)

* Use quotes for includes where appropriate

* Fix lint tests

* Make tests pass hopefully

* Run uncrustify on the entire Pilot.Auto codebase (autowarefoundation#151)

* Run uncrustify on the entire Pilot.Auto codebase

* Exclude open PRs

* Added linters to vehicle_cmd_gate (autowarefoundation#168)

* Added linters to vehicle_cmd_gate

* Use ament_cmake_cppcheck and ament_cmake_cpplint

* Fix linting errors

* Make launch files load vehicle model params dependent on argument (autowarefoundation#228)

* Make vehicle_model configurable in behavior_velocity_planner

* Make vehicle_model configurable in vehicle_cmd_gate

* change from vehicle_model to vehicle_param_file (autowarefoundation#242)

Signed-off-by: kosuke murakami <kosuke.murakami@tier4.jp>

* [update to v0.8.0] vehicle cmd gate (autowarefoundation#252)

* [vehicle_cmd_gate]: Fix launch (autowarefoundation#320)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Ros2 v0.8.0 engage (autowarefoundation#342)

* [autoware_vehicle_msgs]: Add engage message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [as]: Update message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [awapi_awiv_adapter]: Update message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [web_controller]: Update message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [vehicle_cmd_gate]: Update message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [autoware_state_monitor]: Update message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [autoware_control_msgs]: Remove EngageMode message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [simple_planning_simulator]: Update message

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Ros2 v0.8.0 fix packages (autowarefoundation#351)

* add subscription to QoS

* add vihicle_param _file to simple_planning_sim

* update cmake/packages.xml

* comment out unused parameter

* apply lint

* add vehicle_info_util to lane_change_planner

* add vehicle_info_util to vehicle_cmd_gate

* fix cmake of simple planning simulator

* update cmake/packages.xml of vehicle cmd gate

* apply lint

* apply lint

* add latch option to autoware_state_monitor

* delete unused comment

* Ros2 fix service name (autowarefoundation#448)

* [vehicle_cmd_gate]: Fix sevice name

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* [vehicle_cmd_gate]: Fix variable name

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* add use_sim-time option (autowarefoundation#454)

* Sync public repo (autowarefoundation#1228)

* [simple_planning_simulator] add readme (autowarefoundation#424)

* add readme of simple_planning_simulator

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* Update simulator/simple_planning_simulator/README.md

* set transit_margin_time to intersect. planner (autowarefoundation#460)

* Fix pose2twist (autowarefoundation#462)

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Ros2 vehicle info param server (autowarefoundation#447)

* add vehicle_info_param_server

* update vehicle info

* apply format

* fix bug

* skip unnecessary search

* delete vehicle param file

* fix bug

* Ros2 fix topic name part2 (autowarefoundation#425)

* Fix topic name of traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_visualization

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_map_based_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_recognition

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix issues in hdd_reader (autowarefoundation#466)

* Fix some issues detected by Coverity Scan and Clang-Tidy

* Update launch command

* Add more `close(new_sock)`

* Simplify the definitions of struct

* fix: re-construct laneletMapLayer for reindex RTree (autowarefoundation#463)

* Rviz overlay render fix (autowarefoundation#461)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* uncrustified

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* back to RTD as superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Rviz overlay render in update (autowarefoundation#465)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* uncrustified

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* removed unnecessary includes and some dead code

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Adepted remaining vehicle plugin classes to render-in-update concept. Returned to MFD superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* restored RTD superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Makoto Tokunaga <vios-fish@users.noreply.github.com>
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>

* Fix/fix porting miss (autowarefoundation#1254)

* Fix porting miss of vehicle_cmd_gate

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix mistake of autoware_error_monitor.yaml

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Unify Apache-2.0 license name (autowarefoundation#1242)

* Make control modules components (autowarefoundation#1262)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Remove use_sim_time for set_parameter (autowarefoundation#1260)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Porting remote cmd selector (autowarefoundation#1286)

* Feature/add remote cmd selector (autowarefoundation#1179)

* Add in/out args of remote_cmd_converter.launch

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Change remote input topic of vehicle_cmd_gate

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add msgs for remote_cmd_selector

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add remote_cmd_selector

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Rename remote_cmd_selector to external_cmd_selector

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Remove VehicleCommand support in autoware_joy_controller

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Support external_cmd_source in autoware_joy_controller.launch (autowarefoundation#1194)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix porting miss

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix missing function

* modify xml format

* fix include guard

* add callback group

* modify remap name

* Revert "modify remap name"

This reverts commit 169cc8d28442825b1d61b0439b9892c913304527.

* change topic name

* use rclcpp_component

* Remove autoware_debug_msgs from autoware_joy_controller

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Change default mode of autoware_joy_controller

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Refactor vehicle info util (autowarefoundation#1305)

* Update license

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Refactor vehicle_info_util

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Rename and split files

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix interfaces

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix bug and add error handling

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add "// namespace"

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add missing include

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix -Wunused-parameter (autowarefoundation#1836)

* Fix -Wunused-parameter

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix mistake

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>

* suppress warnings for control packages (autowarefoundation#1892)

* add Werror

* add maybe unused

* Add autoware api (autowarefoundation#1979)

* Use EmergencyState instead of deprecated EmergencyMode (autowarefoundation#2030)

* Use EmergencyState instead of deprecated EmergencyMode

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Use stamped type

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* add sort-package-xml hook in pre-commit (autowarefoundation#1881)

* add sort xml hook in pre-commit

* change retval to exit_status

* rename

* add prettier plugin-xml

* use early return

* add license note

* add tier4 license

* restore prettier

* change license order

* move local hooks to public repo

* move prettier-xml to pre-commit-hooks-ros

* update version for bug-fix

* apply pre-commit

* fix subscription topic name (autowarefoundation#2076)

* Add emergency status API (autowarefoundation#2174)

* Fix lateral jerk filter in vehicle cmd gate (autowarefoundation#1657)

* fix lateral jerk limitter

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add const on filter methods

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* add test in vehicle_cmd_gate pkg

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* remove debug code & add comment

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* cosmetic change

Signed-off-by: Takamasa Horibe <takamasa.horib@gmail.com>

* Update control/vehicle_cmd_gate/src/vehicle_cmd_filter.cpp

Co-authored-by: Takamasa Horibe <takamasa.horib@gmail.com>

* [vehicle_cmd_gate] parametrize acceleration (autowarefoundation#1771)

* [vehicle_cmd_gate] parametrize acceleration

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* fix typo

Signed-off-by: TakaHoribe <horibe.takamasa@gmail.com>

* Update control/vehicle_cmd_gate/include/vehicle_cmd_gate/vehicle_cmd_gate.hpp

* Update control/vehicle_cmd_gate/include/vehicle_cmd_gate/vehicle_cmd_gate.hpp

* Update control/vehicle_cmd_gate/config/vehicle_cmd_gate.param.yaml

Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>

Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>

* Change formatter to clang-format and black (autowarefoundation#2332)

* Revert "Temporarily comment out pre-commit hooks"

This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3.

* Replace ament_lint_common with autoware_lint_common

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply Black

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add COLCON_IGNORE (autowarefoundation#500)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* [vehicle cmd gate] porting vehicle cmd gate (autowarefoundation#609)

* remove colcon_ignore

* add auto msg

* add steering report as a temporary

* update

* add README

* update

* delete .iv 's system msgs

* run pre-commit

* modify topic name

* shift to gear

* fix typo

* add command

* Update control/vehicle_cmd_gate/README.md

fix typo

Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>

Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>

* adapt to actuation cmd/status as control msg (autowarefoundation#646)

* adapt to actuation cmd/status as control msg

* fix readme

* fix topics

* fix remaing topics

* as to pacmod interface

* fix vehicle status

* add header to twist

* revert gyro_odometer_change

* revert twist topic change

* revert unchanged package

* fix emergency command (autowarefoundation#665)

* fix emergency command

* for better look

* fix turn signal topic

* [vehicle_cmd_gate]add readme (autowarefoundation#624)

* add README

* update

* update

* update

* Update control/vehicle_cmd_gate/README.md

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Update control/vehicle_cmd_gate/README.md

Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>

* Update control/vehicle_cmd_gate/README.md

Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>

* Update control/vehicle_cmd_gate/README.md

Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>

* change discription of Ackermann control command

* add private namespace for topic names

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

* fix pre commit

Signed-off-by: Takamasa Horibe <horibe.takamasa@gmail.com>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>

* set default gear (autowarefoundation#675)

Co-authored-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>
Co-authored-by: Nikolai Morin <nnmmgit@gmail.com>
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Esteve Fernandez <esteve@apache.org>
Co-authored-by: Kosuke Murakami <kosuke.murakami@tier4.jp>
Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Makoto Tokunaga <vios-fish@users.noreply.github.com>
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: Keisuke Shima <keisuke.shima@tier4.jp>
Co-authored-by: Kenji Miyake <kenji.miyake@tier4.jp>
Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>
Co-authored-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com>
Co-authored-by: Taichi Higashide <taichi.higashide@tier4.jp>
Co-authored-by: Takamasa Horibe <takamasa.horib@gmail.com>
Co-authored-by: Sugatyon <32741405+Sugatyon@users.noreply.github.com>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
  • Loading branch information
22 people authored Dec 7, 2021
1 parent c440cc6 commit fe74c5b
Show file tree
Hide file tree
Showing 11 changed files with 1,594 additions and 0 deletions.
50 changes: 50 additions & 0 deletions control/vehicle_cmd_gate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
cmake_minimum_required(VERSION 3.5)
project(vehicle_cmd_gate)

### Compile options
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
endif()

### Dependencies
find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

# Generate exe file
ament_auto_add_library(vehicle_cmd_gate_node SHARED
src/vehicle_cmd_gate.cpp
src/vehicle_cmd_filter.cpp
)

rclcpp_components_register_node(vehicle_cmd_gate_node
PLUGIN "VehicleCmdGate"
EXECUTABLE vehicle_cmd_gate
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()

ament_add_gtest(test_vehicle_cmd_gate
test/src/test_main.cpp
test/src/test_vehicle_cmd_filter.cpp
)
ament_target_dependencies(test_vehicle_cmd_gate
rclcpp
autoware_control_msgs
)
target_link_libraries(test_vehicle_cmd_gate
vehicle_cmd_gate_node
)
endif()

ament_auto_package(
INSTALL_TO_SHARE
launch
config
)
62 changes: 62 additions & 0 deletions control/vehicle_cmd_gate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# vehicle_cmd_gate

## Purpose

`vehicle_cmd_gate` is the package to get information from emergency handler, planning module, external controller, and send a msg to vehicle.

## Inputs / Outputs

### Input

| Name | Type | Description |
| ------------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------------------- |
| `~/input/steering` | `autoware_auto_vehicle_msgs::msg::SteeringReport` | steering status |
| `~/input/auto/control_cmd` | `autoware_auto_control_msgs::msg::AckermannControlCommand` | command for lateral and longitudinal velocity from planning module |
| `~/input/auto/turn_indicators_cmd` | `autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand` | turn indicators command from planning module |
| `~/input/auto/hazard_lights_cmd` | `autoware_auto_vehicle_msgs::msg::HazardLightsCommand` | hazard lights command from planning module |
| `~/input/auto/gear_cmd` | `autoware_auto_vehicle_msgs::msg::GearCommand` | gear command from planning module |
| `~/input/external/control_cmd` | `autoware_auto_control_msgs::msg::AckermannControlCommand` | command for lateral and longitudinal velocity from external |
| `~/input/external/turn_indicators_cmd` | `autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand` | turn indicators command from external |
| `~/input/external/hazard_lights_cmd` | `autoware_auto_vehicle_msgs::msg::HazardLightsCommand` | hazard lights command from external |
| `~/input/external/gear_cmd` | `autoware_auto_vehicle_msgs::msg::GearCommand` | gear command from external |
| `~/input/external_emergency_stop_heartbeat` | `autoware_external_api_msgs::msg::Heartbeat` | heartbeat |
| `~/input/gate_mode` | `autoware_control_msgs::msg::GateMode` | gate mode (AUTO or EXTERNAL) |
| `~/input/emergency_state` | `autoware_auto_system_msgs::msg::EmergencyState` | used to detect the emergency situation of the vehicle |
| `~/input/emergency/control_cmd` | `autoware_auto_control_msgs::msg::AckermannControlCommand` | command for lateral and longitudinal velocity from emergency handler |
| `~/input/emergency/hazard_lights_cmd` | `autoware_auto_vehicle_msgs::msg::HazardLightsCommand` | hazard lights command from emergency handler |
| `~/input/emergency/gear_cmd` | `autoware_auto_vehicle_msgs::msg::GearCommand` | gear command from emergency handler |
| `~/input/engage` | `autoware_auto_vehicle_msgs::msg::Engage` | engage signal |

### Output

| Name | Type | Description |
| -------------------------------------- | ---------------------------------------------------------- | -------------------------------------------------------- |
| `~/output/vehicle_cmd_emergency` | `autoware_auto_system_msgs::msg::EmergencyState` | emergency state which was originally in vehicle command |
| `~/output/command/control_cmd` | `autoware_auto_control_msgs::msg::AckermannControlCommand` | command for lateral and longitudinal velocity to vehicle |
| `~/output/command/turn_indicators_cmd` | `autoware_auto_vehicle_msgs::msg::TurnIndicatorsCommand` | turn indicators command to vehicle |
| `~/output/command/hazard_lights_cmd` | `autoware_auto_vehicle_msgs::msg::HazardLightsCommand` | hazard lights command to vehicle |
| `~/output/command/gear_cmd` | `autoware_auto_vehicle_msgs::msg::GearCommand` | gear command to vehicle |
| `~/output/gate_mode` | `autoware_control_msgs::msg::GateMode` | gate mode (AUTO or EXTERNAL) |
| `~/output/engage` | `autoware_auto_vehicle_msgs::msg::Engage` | engage signal |
| `~/output/external_emergency` | `autoware_external_api_msgs::msg::Emergency` | external emergency signal |

## Parameters

| Parameter | Type | Description |
| ------------------------------------------- | ------ | -------------------------------------------------------------- |
| `update_period` | double | update period |
| `use_emergency_handling` | bool | true when emergency handler is used |
| `use_external_emergency_stop` | bool | true when external emergency stop information is used |
| `system_emergency_heartbeat_timeout` | double | timeout for system emergency |
| `external_emergency_stop_heartbeat_timeout` | double | timeout for external emergency |
| `stop_hold_acceleration` | double | longitudinal acceleration cmd when vehicle should stop |
| `emergency_acceleration` | double | longitudinal acceleration cmd when vehicle stop with emergency |
| `vel_lim` | double | limit of longitudinal velocity |
| `lon_acc_lim` | double | limit of longitudinal acceleration |
| `lon_jerk_lim` | double | limit of longitudinal jerk |
| `lat_acc_lim` | double | limit of lateral acceleration |
| `lat_jerk_lim` | double | limit of lateral jerk |

## Assumptions / Known limits

TBD.
12 changes: 12 additions & 0 deletions control/vehicle_cmd_gate/config/vehicle_cmd_gate.param.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**:
ros__parameters:
update_rate: 10.0
system_emergency_heartbeat_timeout: 0.5
external_emergency_stop_heartbeat_timeout: 0.0
stop_hold_acceleration: -1.5
emergency_acceleration: -2.4
vel_lim: 25.0
lon_acc_lim: 5.0
lon_jerk_lim: 5.0
lat_acc_lim: 5.0
lat_jerk_lim: 5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
// Copyright 2015-2019 Autoware Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef VEHICLE_CMD_GATE__VEHICLE_CMD_FILTER_HPP_
#define VEHICLE_CMD_GATE__VEHICLE_CMD_FILTER_HPP_

#include <autoware_auto_control_msgs/msg/ackermann_control_command.hpp>

class VehicleCmdFilter
{
public:
VehicleCmdFilter();
~VehicleCmdFilter() = default;

void setWheelBase(double v) { wheel_base_ = v; }
void setVelLim(double v) { vel_lim_ = v; }
void setLonAccLim(double v) { lon_acc_lim_ = v; }
void setLonJerkLim(double v) { lon_jerk_lim_ = v; }
void setLatAccLim(double v) { lat_acc_lim_ = v; }
void setLatJerkLim(double v) { lat_jerk_lim_ = v; }
void setPrevCmd(const autoware_auto_control_msgs::msg::AckermannControlCommand & v)
{
prev_cmd_ = v;
}

void limitLongitudinalWithVel(
autoware_auto_control_msgs::msg::AckermannControlCommand & input) const;
void limitLongitudinalWithAcc(
const double dt, autoware_auto_control_msgs::msg::AckermannControlCommand & input) const;
void limitLongitudinalWithJerk(
const double dt, autoware_auto_control_msgs::msg::AckermannControlCommand & input) const;
void limitLateralWithLatAcc(
const double dt, autoware_auto_control_msgs::msg::AckermannControlCommand & input) const;
void limitLateralWithLatJerk(
const double dt, autoware_auto_control_msgs::msg::AckermannControlCommand & input) const;

private:
double wheel_base_;
double vel_lim_;
double lon_acc_lim_;
double lon_jerk_lim_;
double lat_acc_lim_;
double lat_jerk_lim_;
autoware_auto_control_msgs::msg::AckermannControlCommand prev_cmd_;

double calcLatAcc(const autoware_auto_control_msgs::msg::AckermannControlCommand & cmd) const;
double calcSteerFromLatacc(const double v, const double latacc) const;
double limitDiff(const double curr, const double prev, const double diff_lim) const;
};

#endif // VEHICLE_CMD_GATE__VEHICLE_CMD_FILTER_HPP_
Loading

0 comments on commit fe74c5b

Please sign in to comment.