Skip to content

Commit

Permalink
Test of New Path planning
Browse files Browse the repository at this point in the history
  • Loading branch information
YachtChen committed May 19, 2024
1 parent 0df0695 commit 8dd0864
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
5 changes: 4 additions & 1 deletion run_path_planning.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
source install/setup.bash
colcon build --packages-select path_planning && ros2 run path_planning center_line
#colcon build --packages-select path_planning
# ros2 run path_planning center_line
ros2 run path_planning trajectory_generation

Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def __init__(self):
self.k_speed = 1.0 #speed Controller gain
self.cam_fron_axle_dist= 1 #[m] Wheel base of vehicle
self.max_steer = 27.0 # [degrees] max steering angle
self.target_speed = 20/3.6 #[m/s]
self.target_speed = 3.6/3.6 #[m/s]

#Subscribe for car pose and track
self.create_subscription(PoseArray, "moa/selected_trajectory", self.selected_trajectory_handler, 5)
Expand Down Expand Up @@ -107,8 +107,10 @@ def main_hearback(self, msg):
delta = math.degrees(theta_e + theta_d)
delta = np.clip(delta, -self.max_steer, self.max_steer)
self.steering_angle = delta
self.target_speed = 3.6/3.6
else:
self.steering_angle = 0
self.target_speed = 0
self.get_logger().info("Warning: no trajectory found, will set steering angle to 0!!!!")

# Publish command for velocity
Expand Down
1 change: 1 addition & 0 deletions src/planning/path_planning/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
entry_points={
'console_scripts': [
'trajectory_generator = path_planning.trajectory_generator_HRHCS:main',
'trajectory_generation = path_planning.trajectory_generation:main',
'trajectory_optimisation = path_planning.trajectory_optimisation_CS:main',
'center_line = path_planning.simple_centerline_planner:main',
'shortest_path = path_planning.trajectory_shortest_path:main',
Expand Down
1 change: 1 addition & 0 deletions unity_qucik_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ gnome-terminal -- bash -c "source run_foxglove_ros.sh; exec bash"
gnome-terminal -- bash -c "source run_localization.sh; exec bash"
gnome-terminal -- bash -c "source run_path_planning_visualizer.sh; exec bash"
gnome-terminal -- bash -c "source run_path_planning.sh; exec bash"
gnome-terminal -- bash -c "source run_path_planning_second.sh; exec bash"
gnome-terminal -- bash -c "source run_simulation_car_control.sh; exec bash"

0 comments on commit 8dd0864

Please sign in to comment.