forked from autowarefoundation/autoware.universe
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(twist2accel): rework parameters (autowarefoundation#6266)
* Added twist2accel.param.yaml Signed-off-by: Shintaro SAKODA <[email protected]> * Added twist2accel.schema.json Signed-off-by: Shintaro SAKODA <[email protected]> * Fixed README.md and description Signed-off-by: Shintaro SAKODA <[email protected]> * style(pre-commit): autofix * Removed default parameters Signed-off-by: Shintaro SAKODA <[email protected]> --------- Signed-off-by: Shintaro SAKODA <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
6e38a96
commit ff867c7
Showing
7 changed files
with
48 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ ament_target_dependencies(twist2accel) | |
ament_auto_package( | ||
INSTALL_TO_SHARE | ||
launch | ||
config | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/**: | ||
ros__parameters: | ||
use_odom: true | ||
accel_lowpass_gain: 0.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
<launch> | ||
<arg name="use_odom" default="true"/> | ||
<arg name="accel_lowpass_gain" default="0.9"/> | ||
<arg name="param_file" default="$(find-pkg-share twist2accel)/config/twist2accel.param.yaml"/> | ||
|
||
<arg name="in_odom" default="in_odom"/> | ||
<arg name="in_twist" default="in_twist"/> | ||
<arg name="out_accel" default="out_accel"/> | ||
<node pkg="twist2accel" exec="twist2accel" name="twist2accel" output="screen"> | ||
<remap from="input/odom" to="$(var in_odom)"/> | ||
<remap from="input/twist" to="$(var in_twist)"/> | ||
<remap from="output/accel" to="$(var out_accel)"/> | ||
<param name="accel_lowpass_gain" value="$(var accel_lowpass_gain)"/> | ||
<param name="use_odom" value="$(var use_odom)"/> | ||
<param from="$(var param_file)"/> | ||
</node> | ||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Parameters for twist2accel Nodes", | ||
"type": "object", | ||
"definitions": { | ||
"twist2accel": { | ||
"type": "object", | ||
"properties": { | ||
"use_odom": { | ||
"type": "boolean", | ||
"default": true, | ||
"description": "use odometry if true, else use twist input." | ||
}, | ||
"accel_lowpass_gain": { | ||
"type": "number", | ||
"default": 0.9, | ||
"minimum": 0.0, | ||
"description": "lowpass gain for lowpass filter in estimating acceleration." | ||
} | ||
}, | ||
"required": ["use_odom", "accel_lowpass_gain"] | ||
} | ||
}, | ||
"properties": { | ||
"/**": { | ||
"type": "object", | ||
"properties": { | ||
"ros__parameters": { | ||
"$ref": "#/definitions/twist2accel" | ||
} | ||
}, | ||
"required": ["ros__parameters"] | ||
} | ||
}, | ||
"required": ["/**"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters