Skip to content

Commit

Permalink
Merge pull request #95 from jkk-research/ZZtest_01_16
Browse files Browse the repository at this point in the history
Z ztest 01 16
  • Loading branch information
gfigneczi1 authored Jan 21, 2025
2 parents 111bef7 + 4d3a780 commit 3ff50b2
Show file tree
Hide file tree
Showing 18 changed files with 375 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,17 @@ def generate_launch_description():
package="ctrl_vehicle_control_lat_compensatory",
executable="ctrl_vehicle_control_lat_compensatory",
parameters=[
{"/ctrl/ffGainOffsetGround": 0.66},
{"/ctrl/ffGainOffsetGround": 1.0},
{"/ctrl/ffGainSlope": 0.0},
{"/ctrl/ffLookAheadTime": 0.68},
{"/ctrl/steeringAngleLPFilter": 0.2},
{"/ctrl/fbLookAheadTime": 0.6},
{"/ctrl/fbPGain": 0.8},
{"/ctrl/fbDGain": 1.1},
{"/ctrl/fbPGain": 0.5},
{"/ctrl/fbDGain": 0.1},
{"/ctrl/fbIGain": 0.0},
{"/ctrl/fbMinLookAheadDistance": 0.0},
{"/ctrl/fbIntegralLimit": 3.0}
{"/ctrl/fbIntegralLimit": 3.0},
{"/ctrl/fbThetaGain": 0.0},
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ namespace crp
m_posDerivativeError = (m_posErr-m_posErrPrev)/params.dT;
m_posDerivativeError = m_posDerivativeFilter.lowPassFilter(m_posDerivativeError, m_posDerivativeError_prev, 0.9f);

m_targetAccelerationFB = params.fbPGain*m_posErr +
m_targetAccelerationFB = params.fbPGain*m_posErr*std::abs(6*m_posErr) +
params.fbDGain*m_posDerivativeError;

m_targetAccelerationFB = m_targetAccelerationFB +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,17 @@ crp::apl::CtrlVehicleControlLat::CtrlVehicleControlLat() : Node("CtrlVehicleCont
m_traj_sub_ = this->create_subscription<autoware_planning_msgs::msg::Trajectory>("/plan/trajectory", 10, std::bind(&CtrlVehicleControlLat::trajCallback, this, std::placeholders::_1));
m_egoVehicle_sub_ = this->create_subscription<crp_msgs::msg::Ego>("/ego", 10, std::bind(&CtrlVehicleControlLat::egoVehicleCallback, this, std::placeholders::_1));

this->declare_parameter("/ctrl/ffGainOffsetGround", 0.0f);
this->declare_parameter("/ctrl/ffGainOffsetGround", 0.66f);
this->declare_parameter("/ctrl/ffGainSlope", 0.0f);
this->declare_parameter("/ctrl/ffLookAheadTime", 0.1f);
this->declare_parameter("/ctrl/ffLookAheadTime", 0.68f);
this->declare_parameter("/ctrl/ffMinLookAheadDistance", 0.0f);
this->declare_parameter("/ctrl/steeringAngleLPFilter", 0.5f);
this->declare_parameter("/ctrl/fbLookAheadTime", 0.1f);
this->declare_parameter("/ctrl/fbPGain", 0.1f);
this->declare_parameter("/ctrl/fbDGain", 0.0f);
this->declare_parameter("/ctrl/steeringAngleLPFilter", 0.2f);
this->declare_parameter("/ctrl/fbLookAheadTime", 0.0f);
this->declare_parameter("/ctrl/fbPGain", 0.8f);
this->declare_parameter("/ctrl/fbDGain", 1.1f);
this->declare_parameter("/ctrl/fbIGain", 0.0f);
this->declare_parameter("/ctrl/fbThetaGain", 0.0f);
this->declare_parameter("/ctrl/fbMinLookAheadDistance", 0.5f);
this->declare_parameter("/ctrl/fbThetaGain", 0.05f);
this->declare_parameter("/ctrl/fbMinLookAheadDistance", 0.0f);
this->declare_parameter("/ctrl/fbIntegralLimit", 3.0f);
this->declare_parameter("/ctrl/trajectory_distance", 50.0f);
this->declare_parameter("/ctrl/debugKPIs", true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def generate_launch_description():
package="ctrl_vehicle_control_lat_stanley",
executable="ctrl_vehicle_control_lat_stanley",
parameters=[
{"/ctrl/k_gain": 0.5},
{"/ctrl/k_gain": 1.5},
{"/ctrl/wheelbase": 2.7},
]
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ def generate_launch_description():
output='screen',
parameters=[{
'dt': 0.03,
'wheel_base': 1.9,
'wheel_base': 2.79,
'max_steer_tire_angle': 0.436332,
'Q': [0.001, 0.0, 0.001, 0, 0.6], # Q matrix diagonal elements
'R': [30.0, 2.0], # R matrix diagonal elements
'Q': [0.005, 0.0, 0.005, 0, 3.5], # Q matrix diagonal elements
'R': [10.0, 1.0], # R matrix diagonal elements
}]
)
])
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ void crp::apl::PlanLatLaneFollowHandler::plan(const PlannerInput & input, Planne
{
output.trajectory.clear(); // initialize the output at empty vector in the beginning of each cycle
// TrajectoryPoint trajectoryPoint;
/*for (int n=0; n<input.path.pathPoints.size(); n++)
{
trajectoryPoint.pose.position.x = input.path.pathPoints.at(n).pose.position.x;
trajectoryPoint.pose.position.y = input.path.pathPoints.at(n).pose.position.y;
trajectoryPoint.pose.orientation = 0.0;
trajectoryPoint.velocity = input.path.targetSpeed.at(n);
output.trajectory.push_back(trajectoryPoint);
}*/
// for (int n=0; n<input.path.pathPoints.size(); n++)
// {
// trajectoryPoint.pose.position.x = input.path.pathPoints.at(n).pose.position.x;
// trajectoryPoint.pose.position.y = input.path.pathPoints.at(n).pose.position.y;
// trajectoryPoint.pose.orientation = 0.0;
// trajectoryPoint.velocity = input.path.targetSpeed.at(n);
// output.trajectory.push_back(trajectoryPoint);
// }

// remap parameters
std::vector<double> nodePointDistances;
Expand Down
2 changes: 1 addition & 1 deletion crp_CIL/kalman_pos
Submodule kalman_pos updated 34 files
+8 −11 CMakeLists.txt
+0 −6 README.md
+27 −53 include/CombinedVehicleModel.h
+0 −23 include/DynamicVehicleModel_wEKFwExtPos1.h
+0 −23 include/DynamicVehicleModel_wEKFwExtPos1Pos2.h
+0 −23 include/DynamicVehicleModel_wEKFwExtPos2.h
+0 −23 include/DynamicVehicleModel_wEKFwoExtPos.h
+0 −16 include/DynamicVehicleModel_woEKFwoExtPos.h
+0 −25 include/KinematicVehicleModel_wEKFwExtPos1.h
+0 −25 include/KinematicVehicleModel_wEKFwExtPos1Pos2.h
+0 −25 include/KinematicVehicleModel_wEKFwExtPos2.h
+0 −25 include/KinematicVehicleModel_wEKFwoExtPos.h
+0 −16 include/KinematicVehicleModel_woEKFwoExtPos.h
+8 −9 include/PositionEstimation.h
+27 −31 include/VehicleModelTypeDef.h
+41 −79 launch/kalman_pos_duro1lexus.launch.py
+70 −70 launch/kalman_pos_nissan1.launch.py
+38 −38 launch/kalman_pos_node.launch.py
+38 −38 launch/kalman_pos_nova1.launch.py
+0 −80 launch/kalman_pos_nova1lexus.launch.py
+646 −1,277 src/CombinedVehicleModel.cpp
+0 −441 src/DynamicVehicleModel_wEKFwExtPos1.cpp
+0 −479 src/DynamicVehicleModel_wEKFwExtPos1Pos2.cpp
+0 −441 src/DynamicVehicleModel_wEKFwExtPos2.cpp
+0 −406 src/DynamicVehicleModel_wEKFwoExtPos.cpp
+0 −141 src/DynamicVehicleModel_woEKFwoExtPos.cpp
+0 −350 src/KinematicVehicleModel_wEKFwExtPos1.cpp
+0 −369 src/KinematicVehicleModel_wEKFwExtPos1Pos2.cpp
+0 −350 src/KinematicVehicleModel_wEKFwExtPos2.cpp
+0 −319 src/KinematicVehicleModel_wEKFwoExtPos.cpp
+0 −113 src/KinematicVehicleModel_woEKFwoExtPos.cpp
+176 −124 src/PositionEstimation.cpp
+57 −57 src/VehicleStatusFromSteeringAndSpeed.cpp
+583 −708 src/kalman_pos_node.cpp
15 changes: 1 addition & 14 deletions crp_CIL/novatel_gps_wrapper/src/novatelTopicConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,7 @@ void crp::vil::NovatelTopicConverter::currentPoseCallback(const geometry_msgs::m
geometry_msgs::msg::PoseWithCovarianceStamped poseWithCovariance;
poseWithCovariance.header = msg->header;
poseWithCovariance.pose.pose = msg->pose;

tf2::Quaternion q_orig;
tf2::convert(msg->pose.orientation, q_orig);

tf2::Matrix3x3 m(q_orig);
double roll, pitch, yaw;
m.getRPY(roll, pitch, yaw);

yaw += M_PI / 2.0;

tf2::Quaternion q_rotated;
q_rotated.setRPY(roll, pitch, yaw);

poseWithCovariance.pose.pose.orientation = tf2::toMsg(q_rotated);
poseWithCovariance.pose.pose.orientation = msg->pose.orientation;

m_pub_currentPoseWithCovariance_->publish(poseWithCovariance);
}
Expand Down
2 changes: 1 addition & 1 deletion crp_VIL/lanelet_handler/launch/laneletFileLoader.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
def generate_launch_description():
lanelet2_path_arg = DeclareLaunchArgument(
'map_file_path',
default_value="/home/matyko/Downloads/ZalaZone_Handling.osm",
default_value="/home/dev/lanelet2_maps/auto_mapper/lightweight_lanelet.osm",
description='Path to the lanelet2 map file'
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include <geometry_msgs/msg/accel_with_covariance_stamped.hpp>
#include <pacmod3_msgs/msg/yaw_rate_rpt.hpp>
#include <pacmod3_msgs/msg/linear_accel_rpt.hpp>
#include <std_msgs/msg/float32.hpp>


#include "pacmod_extender/pacmodDefinitions.hpp"

Expand All @@ -29,6 +31,7 @@ class PacmodExtender : public rclcpp::Node
rclcpp::Publisher<geometry_msgs::msg::AccelWithCovarianceStamped>::SharedPtr m_pub_vehicleAccel_;
rclcpp::Publisher<pacmod3_msgs::msg::LinearAccelRpt>::SharedPtr m_pub_linAccel_;
rclcpp::Publisher<pacmod3_msgs::msg::YawRateRpt>::SharedPtr m_pub_yawRate_;
rclcpp::Publisher<std_msgs::msg::Float32>::SharedPtr m_pub_tireAngle_;

PacmodDefinitions pacmodDefinitions;

Expand Down
6 changes: 6 additions & 0 deletions crp_VIL/pacmod_extender/src/pacmodExtender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ PacmodExtender::PacmodExtender() : Node("pacmod_extender_node")
m_pub_vehicleAccel_ = this->create_publisher<geometry_msgs::msg::AccelWithCovarianceStamped>("/sensing/vehicle/accel", 10);
m_pub_linAccel_ = this->create_publisher<pacmod3_msgs::msg::LinearAccelRpt>("pacmod/linear_accel_rpt", 10);
m_pub_yawRate_ = this->create_publisher<pacmod3_msgs::msg::YawRateRpt>("pacmod/yaw_rate_calc_rpt", 10);
m_pub_tireAngle_ = this->create_publisher<std_msgs::msg::Float32>("/sensing/vehicle/tire_angle", 10);

m_timer_ = this->create_wall_timer(std::chrono::milliseconds(33), std::bind(&PacmodExtender::publishMessages, this));
}
Expand Down Expand Up @@ -51,6 +52,11 @@ void PacmodExtender::twistCallback(const geometry_msgs::msg::TwistStamped::Share
m_twistWithCovariance.twist.twist = msg->twist;
// twist callback has tire angle in angular.z, the published message should have yaw rate
m_twistWithCovariance.twist.twist.angular.z = msg->twist.linear.x * tan(msg->twist.angular.z) / WHEELBASE;

std_msgs::msg::Float32 tireAngleMsg;
tireAngleMsg.data = msg->twist.angular.z/14.8;

m_pub_tireAngle_->publish(tireAngleMsg);
}


Expand Down
2 changes: 1 addition & 1 deletion external/autoware_msgs
Submodule autoware_msgs updated 50 files
+0 −4 .github/ISSUE_TEMPLATE/bug.yaml
+0 −4 .github/ISSUE_TEMPLATE/config.yml
+0 −4 .github/ISSUE_TEMPLATE/task.yaml
+8 −0 .github/PULL_REQUEST_TEMPLATE.md
+40 −0 .github/PULL_REQUEST_TEMPLATE/small-change.md
+50 −0 .github/PULL_REQUEST_TEMPLATE/standard-change.md
+3 −8 .github/dependabot.yaml
+0 −11 .github/pull_request_template.md
+1 −5 .github/stale.yml
+7 −10 .github/sync-files.yaml
+38 −30 .github/workflows/build-and-test-differential.yaml
+3 −15 .github/workflows/build-and-test.yaml
+0 −29 .github/workflows/comment-on-pr.yaml
+2 −6 .github/workflows/github-release.yaml
+2 −9 .github/workflows/pre-commit-optional.yaml
+3 −7 .github/workflows/pre-commit.yaml
+0 −4 .github/workflows/semantic-pull-request.yaml
+0 −26 .github/workflows/spell-check-daily.yaml
+3 −10 .github/workflows/spell-check-differential.yaml
+4 −8 .github/workflows/sync-files.yaml
+0 −5 .markdownlint.yaml
+1 −5 .pre-commit-config-optional.yaml
+7 −74 .pre-commit-config.yaml
+0 −4 .prettierignore
+0 −4 .prettierrc.yaml
+0 −4 .yamllint.yaml
+3 −6 autoware_common_msgs/CHANGELOG.rst
+1 −1 autoware_common_msgs/package.xml
+2 −5 autoware_control_msgs/CHANGELOG.rst
+1 −1 autoware_control_msgs/package.xml
+2 −5 autoware_localization_msgs/CHANGELOG.rst
+1 −1 autoware_localization_msgs/package.xml
+6 −11 autoware_map_msgs/CHANGELOG.rst
+0 −2 autoware_map_msgs/CMakeLists.txt
+0 −5 autoware_map_msgs/README.md
+0 −18 autoware_map_msgs/msg/MapProjectorInfo.msg
+1 −2 autoware_map_msgs/package.xml
+14 −17 autoware_perception_msgs/CHANGELOG.rst
+1 −1 autoware_perception_msgs/package.xml
+15 −18 autoware_planning_msgs/CHANGELOG.rst
+1 −1 autoware_planning_msgs/package.xml
+2 −5 autoware_sensing_msgs/CHANGELOG.rst
+1 −1 autoware_sensing_msgs/package.xml
+2 −5 autoware_system_msgs/CHANGELOG.rst
+1 −1 autoware_system_msgs/package.xml
+0 −3 autoware_v2x_msgs/CHANGELOG.rst
+217 −228 autoware_v2x_msgs/doc/virtual-gate-nodes.drawio.svg
+1 −1 autoware_v2x_msgs/package.xml
+6 −9 autoware_vehicle_msgs/CHANGELOG.rst
+1 −1 autoware_vehicle_msgs/package.xml
102 changes: 102 additions & 0 deletions launch/crp_launcher/launch/core_lqr.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.conditions import LaunchConfigurationEquals
from launch.launch_description_sources import PythonLaunchDescriptionSource, AnyLaunchDescriptionSource
from ament_index_python.packages import get_package_share_directory
from os.path import join


def generate_launch_description():
# NODES

environmental_fusion = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('prcp_situation_analysis'),
'launch',
'environmental_fusion.launch.py')
)
)

behavior_planning = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_behavior_planning'),
'launch',
'behavior_planning.launch.py'
)
)
)

motion_planning = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_motion_planning'),
'launch',
'motion_planning.launch.py'
)
)
)

planner_lat_lane_follow_ldm = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_lat_lane_follow_ldm'),
'launch',
'plan_lat_lane_follow_ldm.launch.py'
)
)
)

planner_lon_intelligent_speed_adjust = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_lon_intelligent_speed_adjust'),
'launch',
'plan_lon_intelligent_speed_adjust.launch.py'
)
)
)

vehicle_control = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control'),
'launch',
'ctrl_vehicle_control.launch.py')
)
)

vehicle_control_lat = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control_lqr'),
'launch',
'lat_lon_control_lqr.launch.py')
)
)

# vehicle_control_long = IncludeLaunchDescription(
# PythonLaunchDescriptionSource(
# join(
# get_package_share_directory('ctrl_vehicle_control_long'),
# 'launch',
# 'ctrl_vehicle_control_long.launch.py')
# )
# )

return LaunchDescription([
# nodes
environmental_fusion,
behavior_planning,
planner_lat_lane_follow_ldm,
planner_lon_intelligent_speed_adjust,
motion_planning,
vehicle_control,
vehicle_control_lat,
# vehicle_control_long,


])
102 changes: 102 additions & 0 deletions launch/crp_launcher/launch/core_pure_p.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.substitutions import LaunchConfiguration
from launch.conditions import LaunchConfigurationEquals
from launch.launch_description_sources import PythonLaunchDescriptionSource, AnyLaunchDescriptionSource
from ament_index_python.packages import get_package_share_directory
from os.path import join


def generate_launch_description():
# NODES

environmental_fusion = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('prcp_situation_analysis'),
'launch',
'environmental_fusion.launch.py')
)
)

behavior_planning = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_behavior_planning'),
'launch',
'behavior_planning.launch.py'
)
)
)

motion_planning = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_motion_planning'),
'launch',
'motion_planning.launch.py'
)
)
)

planner_lat_lane_follow_ldm = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_lat_lane_follow_ldm'),
'launch',
'plan_lat_lane_follow_ldm.launch.py'
)
)
)

planner_lon_intelligent_speed_adjust = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('plan_lon_intelligent_speed_adjust'),
'launch',
'plan_lon_intelligent_speed_adjust.launch.py'
)
)
)

vehicle_control = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control'),
'launch',
'ctrl_vehicle_control.launch.py')
)
)

vehicle_control_lat = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control_lat_pure_p'),
'launch',
'ctrl_vehicle_control_lat_pure_p.launch.py')
)
)

vehicle_control_long = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
join(
get_package_share_directory('ctrl_vehicle_control_long'),
'launch',
'ctrl_vehicle_control_long.launch.py')
)
)

return LaunchDescription([
# nodes
environmental_fusion,
behavior_planning,
planner_lat_lane_follow_ldm,
planner_lon_intelligent_speed_adjust,
motion_planning,
vehicle_control,
vehicle_control_lat,
vehicle_control_long,


])
Loading

0 comments on commit 3ff50b2

Please sign in to comment.