diff --git a/control/autoware_trajectory_follower_node/README.md b/control/autoware_trajectory_follower_node/README.md index ac05dd67f18e6..1c4d2f1e1619e 100644 --- a/control/autoware_trajectory_follower_node/README.md +++ b/control/autoware_trajectory_follower_node/README.md @@ -140,14 +140,7 @@ Giving the longitudinal controller information about steer convergence allows it #### Parameter -- `ctrl_period`: control commands publishing period -- `timeout_thr_sec`: duration in second after which input messages are discarded. - - Each time the node receives lateral and longitudinal commands from each controller, it publishes an `Control` if the following two conditions are met. - 1. Both commands have been received. - 2. The last received commands are not older than defined by `timeout_thr_sec`. -- `lateral_controller_mode`: `mpc` or `pure_pursuit` - - (currently there is only `PID` for longitudinal controller) -- `enable_control_cmd_horizon_pub`: publish `ControlHorizon` or not (default: false) +{{ json_to_markdown("control/autoware_trajectory_follower_node/schema/simple_trajectory_follower.schema.json") }} ## Debugging diff --git a/control/autoware_trajectory_follower_node/config/controller_node.param.yaml b/control/autoware_trajectory_follower_node/config/controller_node.param.yaml new file mode 100644 index 0000000000000..0f66c6c38698b --- /dev/null +++ b/control/autoware_trajectory_follower_node/config/controller_node.param.yaml @@ -0,0 +1,7 @@ +/**: + ros__parameters: + ctrl_period: $(var ctrl_period) + timeout_thr_sec: $(var timeout_thr_sec) + enable_control_cmd_horizon_pub: $(var enable_control_cmd_horizon_pub) + lateral_controller_mode: $(var lateral_controller_mode) + longitudinal_controller_mode: $(var longitudinal_controller_mode) diff --git a/control/autoware_trajectory_follower_node/schema/controller_node.scehma.json b/control/autoware_trajectory_follower_node/schema/controller_node.scehma.json new file mode 100644 index 0000000000000..5d880d76d293f --- /dev/null +++ b/control/autoware_trajectory_follower_node/schema/controller_node.scehma.json @@ -0,0 +1,56 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "autoware_trajectory_follower_node parameters", + "type": "object", + "definitions": { + "controller_node": { + "type": "object", + "properties": { + "ctrl_period": { + "type": "number", + "description": "Control period in seconds.", + "default": 0.0 + }, + "timeout_thr_sec": { + "type": "number", + "description": "Timeout threshold in seconds.", + "default": 0.0 + }, + "enable_control_cmd_horizon_pub": { + "type": "boolean", + "description": "Indicates whether to enable the publication of the control command horizon.", + "default": false + }, + "lateral_controller_mode": { + "type": "string", + "description": "The mode of the lateral controller, e.g., 'mpc' or 'pure_pursuit'.", + "default": "" + }, + "longitudinal_controller_mode": { + "type": "string", + "description": "The mode of the longitudinal controller, e.g., 'pid'.", + "default": "" + } + }, + "required": [ + "ctrl_period", + "timeout_thr_sec", + "enable_control_cmd_horizon_pub", + "lateral_controller_mode", + "longitudinal_controller_mode" + ] + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/controller_node" + } + }, + "required": ["ros__parameters"] + } + }, + "required": ["/**"] +} diff --git a/control/autoware_trajectory_follower_node/schema/simple_trajectory_follower.schema.json b/control/autoware_trajectory_follower_node/schema/simple_trajectory_follower.schema.json new file mode 100644 index 0000000000000..c4120fbd05438 --- /dev/null +++ b/control/autoware_trajectory_follower_node/schema/simple_trajectory_follower.schema.json @@ -0,0 +1,40 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "autoware_trajectory_follower_node parameters", + "type": "object", + "definitions": { + "simple_trajectory_follower": { + "type": "object", + "properties": { + "use_external_target_vel": { + "type": "boolean", + "description": "Indicates whether to use an external target velocity.", + "default": false + }, + "external_target_vel": { + "type": "number", + "description": "The value of the external target velocity in m/s.", + "default": 0.0 + }, + "lateral_deviation": { + "type": "number", + "description": "The allowed lateral deviation in meters.", + "default": 0.0 + } + }, + "required": ["use_external_target_vel", "external_target_vel", "lateral_deviation"] + } + }, + "properties": { + "/**": { + "type": "object", + "properties": { + "ros__parameters": { + "$ref": "#/definitions/simple_trajectory_follower" + } + }, + "required": ["ros__parameters"] + } + }, + "required": ["/**"] +}