Skip to content

Commit 0f6057c

Browse files
committed
Update: FSD Algorithm 3.0
1 parent e87e34c commit 0f6057c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1467
-594
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ clion-cmake/*
3939
# Profiler files
4040
*.prof
4141
*.pdf
42+
43+
# IPOPT
44+
Ipopt-3.12.7/*

ros/common/fsd_common_meta/missions/acceleration.launch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<!-- for perception -->
44
<include file="$(find line_detector)/launch/line_detector.launch"/>
55
<include file="$(find lidar_cluster)/launch/lidar_cluster.launch"/>
6-
<!-- for localization -->
6+
<!-- for planning -->
7+
<include file="$(find path_generator)/launch/acceleration.launch"/>
78
<!-- for control-->
89
<include file="$(find control)/launch/acceleration.launch"/>
910

ros/common/fsd_common_meta/missions/skidpad.launch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
<!-- for perception -->
44
<include file="$(find skidpad_detector)/launch/skidpad_detector.launch"/>
55
<include file="$(find lidar_cluster)/launch/lidar_cluster.launch"/>
6-
<!-- for localization -->
6+
<!-- for planning -->
7+
<include file="$(find path_generator)/launch/skidpad.launch"/>
78
<!-- for control-->
89
<include file="$(find control)/launch/skidpad.launch"/>
910

ros/common/fsd_common_meta/missions/trackdrive.launch

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<launch>
33
<!-- for perception -->
44
<include file="$(find lidar_cluster)/launch/lidar_cluster.launch"/>
5-
<!-- for localization -->
5+
<!-- for planning -->
6+
<include file="$(find path_generator)/launch/trackdrive.launch"/>
67
<!-- for control-->
78
<include file="$(find control)/launch/trackdrive.launch"/>
89

ros/common/fsd_common_msgs/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ add_message_files( # Tell catkin which custom message files to include
1919
CarState.msg
2020
CarStateDt.msg
2121
Map.msg
22+
Trajectory.msg
23+
TrajectoryPoint.msg
2224
)
2325

2426
generate_messages(
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
std_msgs/Header header
2+
3+
fsd_common_msgs/TrajectoryPoint[] trajectory
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
geometry_msgs/Point pts
2+
std_msgs/Float64 yaw
3+
4+
std_msgs/Float64 curvature
5+
std_msgs/Float64 velocity
6+
std_msgs/Float64 r
7+
std_msgs/Float64 acc

ros/control/controller/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,27 +46,27 @@ include_directories(
4646
${EIGEN3_INCLUDE_DIRS}
4747
${catkin_INCLUDE_DIRS}
4848
${IPOPT_INCLUDE_DIRS}
49-
/usr/include/eigen3
49+
/usr/include/eigen3
5050
)
5151

5252
add_executable(${PROJECT_NAME}
5353
src/control.cpp
5454
src/control_handle.cpp
55-
src/main.cpp
55+
src/main.cpp
5656
include/Utils/types.h
57-
src/Track/track_base.cpp
58-
src/Track/trackdrive_track.cpp
59-
src/Track/line_track.cpp
60-
src/Track/skidpad_track.cpp
57+
# src/Track/track_base.cpp
58+
# src/Track/trackdrive_track.cpp
59+
# src/Track/line_track.cpp
60+
# src/Track/skidpad_track.cpp
6161
src/Solver/solver_base.cpp
6262
src/Solver/mpc_solver.cpp
6363
src/Solver/pure_pursuit_solver.cpp
64-
src/Utils/visual.cpp)
64+
src/Utils/visual.cpp)
6565

6666
target_link_libraries(${PROJECT_NAME}
6767
${catkin_LIBRARIES}
6868
${IPOPT_LIBRARIES}
6969
${OpenCV_LIBS}
7070
)
7171

72-
message(STATUS "IPOPT LIBRARIES:" ${IPOPT_LIBRARIES})
72+
message(STATUS "IPOPT LIBRARIES:" ${IPOPT_LIBRARIES})

ros/control/controller/README.md

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,14 @@ sudo bash install_cppad.bash
2828

2929
## ROS topic
3030

31-
### Acceleration Mission
31+
#### **Subscriber**
3232

33-
* **Subscriber**
34-
* /estimation/slam/state
35-
* /planning/end_point
36-
* **Publisher**
37-
* /control/pure_pursuit/control_command
33+
* /estimation/slam/state
34+
* /planning/ref_path
3835

39-
### Skidpad Mission
36+
#### **Publisher**
4037

41-
* **Subscriber**
42-
* /estimation/slam/state
43-
* /transform_matrix
44-
* **Publisher**
45-
* /control/pure_pursuit/control_command
46-
47-
### **Trackdrive Mission**
48-
49-
* **Subscriber**
50-
* /map
51-
* /estimation/slam/state
52-
* **Publisher**
53-
* /control/pure_pursuit/control_command
38+
* /control/pure_pursuit/control_command
5439

5540
## Step
5641

@@ -95,7 +80,7 @@ In the `./config` folder, we provide three `.yaml` files. Each file contains dif
9580
## Note:
9681

9782
* Remember to adjust the `car_length` in the `.yaml` file, once you want to run different racecar.
98-
* If you want to be faster, you can change the `desire_vel` in `.yaml` file.
99-
* Topic `/transform_matrix` comes from [skidpad detector](https://github.com/bitfsd/fsd_algorithm/tree/master/ros/planning/skidpad_detector).
100-
* Topic `/planning/end_point` comes form [line detector](https://github.com/bitfsd/fsd_algorithm/tree/master/ros/planning/line_detector).
83+
* If you want to be faster, you can change the `desire_vel` in `.yaml` file. Note that the MPC controller's velocity is related to the velocity of the reference path from [path_generator](https://github.com/bitfsd/fsd_algorithm/tree/master/ros/planning/path_generator).
84+
85+
10186

ros/control/controller/config/acceleration.yaml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Subscriber
22
car_state_topic_name: /estimation/slam/state
33

4-
end_point_topic_name: /planning/end_point
4+
ref_path_topic_name: /planning/ref_path
55

66
# Publisher
77
ctrl_cmd_topic_name: /control/pure_pursuit/control_command
@@ -27,11 +27,6 @@ car_length: 1.88
2727

2828
look_ahead: 20
2929

30-
# Track params:
31-
interval: 0.05
32-
33-
max_lat_acc: 3.0
34-
3530
# other params:
3631
N: 40
3732

0 commit comments

Comments
 (0)