-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(control_data_collecting_tool): add trajectory inside circle and lanelet2 trajectory #156
Changes from 14 commits
98cfbb1
6305aa5
43316cf
40c6c9c
a9d671a
5d8654a
61312ec
4adc140
063f281
1e31241
2d954d8
ebd457e
5f7df16
d3b8e37
7014de7
80e95a8
2362225
08bc15e
857f08b
36ee806
9f6e7ef
ef6afa9
c6d6cfb
3537a91
42e524e
fa6c2a7
b5a4630
edf18ab
57856fa
31449f9
ffd36b1
50f46bd
d372051
1cdbd05
1f5ec46
f98536d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/**: | ||
ros__parameters: | ||
LOAD_ROSBAG2_FILES: true | ||
|
||
# COURSE_NAME: eight_course | ||
# COURSE_NAME: u_shaped_return | ||
# COURSE_NAME: straight_line_positive | ||
# COURSE_NAME: straight_line_negative | ||
COURSE_NAME: reversal_loop_circle | ||
# COURSE_NAME: along_road | ||
|
||
NUM_BINS_V: 10 | ||
NUM_BINS_STEER: 20 | ||
NUM_BINS_A: 10 | ||
V_MIN: 0.0 | ||
V_MAX: 11.5 | ||
STEER_MIN: -0.6 | ||
STEER_MAX: 0.6 | ||
A_MIN: -1.0 | ||
A_MAX: 1.0 | ||
|
||
max_lateral_accel: 2.0 | ||
lateral_error_threshold: 2.79 | ||
yaw_error_threshold: 0.75 | ||
velocity_limit_by_tracking_error: 1.0 | ||
mov_ave_window: 50 | ||
target_longitudinal_velocity: 6.0 | ||
|
||
pure_pursuit_type: linearized | ||
# pure_pursuit_type: naive | ||
wheel_base: 2.79 | ||
acc_kp: 1.0 | ||
lookahead_time: 2.0 | ||
min_lookahead: 2.0 | ||
linearized_pure_pursuit_steer_kp_param: 2.0 | ||
linearized_pure_pursuit_steer_kd_param: 2.0 | ||
stop_acc: -2.0 | ||
stop_jerk_lim: 5.0 | ||
lon_acc_lim: 1.5 | ||
lon_jerk_lim: 0.5 | ||
steer_lim: 0.6 | ||
steer_rate_lim: 0.6 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/**: | ||
ros__parameters: | ||
# Course Specific Parameters | ||
velocity_on_curve: 3.5 | ||
stopping_distance: 15.0 | ||
course_width: 1.5 | ||
|
||
# Smoothing window for calculating curvature | ||
smoothing_window: 100 | ||
|
||
# Data Collection Range | ||
COLLECTING_DATA_V_MIN: 0.5 | ||
COLLECTING_DATA_V_MAX: 8.0 | ||
COLLECTING_DATA_A_MIN: -1.0 | ||
COLLECTING_DATA_A_MAX: 1.0 | ||
|
||
# Noise Parameters | ||
longitudinal_velocity_noise_amp: 0.01 | ||
longitudinal_velocity_noise_min_period: 5.0 | ||
longitudinal_velocity_noise_max_period: 20.0 | ||
|
||
acc_noise_amp: 0.01 | ||
acc_noise_min_period: 5.0 | ||
acc_noise_max_period: 20.0 | ||
|
||
steer_noise_amp: 0.01 | ||
steer_noise_min_period: 10.0 | ||
steer_noise_max_period: 20.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/**: | ||
ros__parameters: | ||
# Course Specific Parameters | ||
velocity_on_curve: 4.5 | ||
# Smoothing window for trajectory | ||
smoothing_window: 400 | ||
|
||
# Data Collection Range | ||
COLLECTING_DATA_V_MIN: 0.5 | ||
COLLECTING_DATA_V_MAX: 8.0 | ||
COLLECTING_DATA_A_MIN: -1.0 | ||
COLLECTING_DATA_A_MAX: 1.0 | ||
|
||
# Noise Parameters | ||
longitudinal_velocity_noise_amp: 0.01 | ||
longitudinal_velocity_noise_min_period: 5.0 | ||
longitudinal_velocity_noise_max_period: 20.0 | ||
|
||
acc_noise_amp: 0.01 | ||
acc_noise_min_period: 5.0 | ||
acc_noise_max_period: 20.0 | ||
|
||
steer_noise_amp: 0.01 | ||
steer_noise_min_period: 5.0 | ||
steer_noise_max_period: 20.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/**: | ||
ros__parameters: | ||
# Course Specific Parameters | ||
trajectory_radius: 35.0 | ||
enclosing_radius: 40.0 | ||
look_ahead_distance: 15.0 | ||
|
||
# Data Collection Range | ||
COLLECTING_DATA_V_MIN: 0.5 | ||
COLLECTING_DATA_V_MAX: 8.0 | ||
COLLECTING_DATA_A_MIN: -1.0 | ||
COLLECTING_DATA_A_MAX: 1.0 | ||
|
||
# Noise Parameters | ||
longitudinal_velocity_noise_amp: 0.01 | ||
longitudinal_velocity_noise_min_period: 5.0 | ||
longitudinal_velocity_noise_max_period: 20.0 | ||
|
||
acc_noise_amp: 0.01 | ||
acc_noise_min_period: 5.0 | ||
acc_noise_max_period: 20.0 | ||
|
||
steer_noise_amp: 0.01 | ||
steer_noise_min_period: 5.0 | ||
steer_noise_max_period: 20.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/**: | ||
ros__parameters: | ||
# Course Specific Parameters | ||
stopping_buffer_distance: 10.0 | ||
|
||
# Data Collection Range | ||
COLLECTING_DATA_V_MIN: 0.5 | ||
COLLECTING_DATA_V_MAX: 8.0 | ||
COLLECTING_DATA_A_MIN: -1.0 | ||
COLLECTING_DATA_A_MAX: 1.0 | ||
|
||
# Noise Parameters | ||
longitudinal_velocity_noise_amp: 0.01 | ||
longitudinal_velocity_noise_min_period: 5.0 | ||
longitudinal_velocity_noise_max_period: 20.0 | ||
|
||
acc_noise_amp: 0.01 | ||
acc_noise_min_period: 5.0 | ||
acc_noise_max_period: 20.0 | ||
|
||
steer_noise_amp: 0.01 | ||
steer_noise_min_period: 5.0 | ||
steer_noise_max_period: 20.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/**: | ||
ros__parameters: | ||
# Course Specific Parameters | ||
stopping_buffer_distance: 10.0 | ||
|
||
# Data Collection Range | ||
COLLECTING_DATA_V_MIN: 0.5 | ||
COLLECTING_DATA_V_MAX: 8.0 | ||
COLLECTING_DATA_A_MIN: -1.0 | ||
COLLECTING_DATA_A_MAX: 1.0 | ||
|
||
# Noise Parameters | ||
longitudinal_velocity_noise_amp: 0.01 | ||
longitudinal_velocity_noise_min_period: 5.0 | ||
longitudinal_velocity_noise_max_period: 20.0 | ||
|
||
acc_noise_amp: 0.01 | ||
acc_noise_min_period: 5.0 | ||
acc_noise_max_period: 20.0 | ||
|
||
steer_noise_amp: 0.01 | ||
steer_noise_min_period: 5.0 | ||
steer_noise_max_period: 20.0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/**: | ||
ros__parameters: | ||
# Course Specific Parameters | ||
velocity_on_curve: 4.5 | ||
|
||
# Data Collection Range | ||
COLLECTING_DATA_V_MIN: 0.5 | ||
COLLECTING_DATA_V_MAX: 8.0 | ||
COLLECTING_DATA_A_MIN: -1.0 | ||
COLLECTING_DATA_A_MAX: 1.0 | ||
|
||
# Noise Parameters | ||
longitudinal_velocity_noise_amp: 0.01 | ||
longitudinal_velocity_noise_min_period: 5.0 | ||
longitudinal_velocity_noise_max_period: 20.0 | ||
|
||
acc_noise_amp: 0.01 | ||
acc_noise_min_period: 5.0 | ||
acc_noise_max_period: 20.0 | ||
|
||
steer_noise_amp: 0.01 | ||
steer_noise_min_period: 5.0 | ||
steer_noise_max_period: 20.0 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,31 +19,61 @@ | |
from ament_index_python.packages import get_package_share_directory | ||
import launch | ||
from launch import LaunchService | ||
from launch.actions import DeclareLaunchArgument | ||
from launch.substitutions import LaunchConfiguration | ||
from launch_ros.actions import Node | ||
import yaml | ||
|
||
|
||
# Load yaml file | ||
def get_course_name(yaml_file_path): | ||
with open(yaml_file_path, "r") as file: | ||
data = yaml.safe_load(file) | ||
|
||
# get 'COURSE_NAME' | ||
course_name = data.get("/**", {}).get("ros__parameters", {}).get("COURSE_NAME", None) | ||
return course_name | ||
|
||
|
||
def generate_launch_description(): | ||
# Define the argument for map_path | ||
DeclareLaunchArgument("map_path", description="Path to the map directory") | ||
# Use the map_path argument in parameters | ||
map_path = LaunchConfiguration("map_path") | ||
|
||
# Get the path to the common param file | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry I forgot but we can get map with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In ef6afa9, I modified it so that it works without reading the map_path when the along_road feature is not used. (I had the wrong URL, so I have replaced it with the correct one.) |
||
package_share_directory = get_package_share_directory("control_data_collecting_tool") | ||
param_file_path = os.path.join(package_share_directory, "config", "param.yaml") | ||
common_param_file_path = os.path.join(package_share_directory, "config", "common_param.yaml") | ||
|
||
# Get the path to the course-specific param file | ||
course_name = get_course_name(common_param_file_path) | ||
course_specific_param_file_path = os.path.join( | ||
package_share_directory, "config/course_param", course_name + "_param.yaml" | ||
) | ||
|
||
return launch.LaunchDescription( | ||
[ | ||
Node( | ||
package="control_data_collecting_tool", | ||
executable="data_collecting_pure_pursuit_trajectory_follower.py", | ||
name="data_collecting_pure_pursuit_trajectory_follower", | ||
parameters=[param_file_path], | ||
parameters=[common_param_file_path], | ||
), | ||
Node( | ||
package="control_data_collecting_tool", | ||
executable="data_collecting_trajectory_publisher.py", | ||
name="data_collecting_trajectory_publisher", | ||
parameters=[param_file_path], | ||
parameters=[ | ||
common_param_file_path, | ||
course_specific_param_file_path, | ||
{"map_path": map_path}, | ||
], | ||
), | ||
Node( | ||
package="control_data_collecting_tool", | ||
executable="data_collecting_plotter.py", | ||
name="data_collecting_plotter", | ||
parameters=[param_file_path], | ||
parameters=[common_param_file_path], | ||
), | ||
Node( | ||
package="control_data_collecting_tool", | ||
|
@@ -54,7 +84,7 @@ def generate_launch_description(): | |
package="control_data_collecting_tool", | ||
executable="data_collecting_data_counter.py", | ||
name="data_collecting_data_counter", | ||
parameters=[param_file_path], | ||
parameters=[common_param_file_path], | ||
), | ||
] | ||
) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
memo: the data collection area only indicates the center, currently need to set in params.
better to specify radius from area in the future