Skip to content

Latest commit

 

History

History
100 lines (80 loc) · 3.79 KB

pure_pursuit_sl_en.md

File metadata and controls

100 lines (80 loc) · 3.79 KB

Usage example of pure_pursuit_sl.slx

1. Run Autoware

Run Autoware to launch the ROS master.
autoware

The Runtime Manager window is launched.
runtime_manager

2. Load vehicle model

Open the Setup tab of the Runtime Manager. Load a vehicle model.
setup_tab_load_vehicle_model

3. Load vector map and TF

Open the Map tab of the Runtime Manager. Load Vector Map and TF.
map_tab_load_vectormap_tf

4. Launch rviz

Launch the rviz by clicking the RViz button on the Runtime Manager.
click_rviz

When rviz starts, select [File]-[Open Config] from the menu.
rviz_file_open_config

Select " ~/ Autoware / ros / src / .config / rviz / default.rviz" on the file dialog.
choose_file_to_open

After Config setting, Vector Map is displayed on the rviz screen.
show_vectormap

5. Settings on the Runtime Manager's Computing tab

(1) Click "app" of waypoint_loader and select the csv file where the route is stored.
waypoint_loader
After selecting the csv file, check the waypoint_loader checkbox.

(2) Click "app" of vel_pose_connect and check "Simulation Mode".
vel_pose_connect
After setting the "Simulation Mode", check the vel_pose_connect checkbox.

(3) Click "app" of wf_simulator and set "Initialize Source" to "Rviz".
wf_simulator_app
After setting the "Initialize Source", check the wf_simulator checkbox.

(4) Check the checkboxes for lane_rule, lane_stop, lane_select, obstacle_avoid, velocity_set, twist_filter and wf_simulator. After setting, the Computing tab is as shown below.
computing_tab

6. Connect MATLAB to Autoware (ROS Master)

Connect to the ROS master using the rosinit command in MATLAB. Set the rosinit arguments according to your environment.

rosinit();

rosinit

7. Open pure_pursuit created in Simulink.

Add the folder containing the pure_pursuit_sl.slx file to MATLAB search path, open the pure_pursuit Simulink model.

pure_pursuit_folder = fullfile(autoware.getRootDirectory(), ...  
                        'benchmark', 'computing', 'planning', 'motion', 'waypoint_follower', ... 
                        'pure_pursuit');
addpath(pure_pursuit_folder);
model = 'pure_pursuit_sl';
open_system(model);

pure_pursuit_sl_top

8. Run pure_pursuit created in Simulink

Run the Simulink model.

set_param(model, 'SimulationCommand', 'Start');

9. Set the initial position of the vehicle with rviz

(1) Click "2D Pose Estimate" of rviz.
(2) Next, drag the mouse in the direction of movement from the initial position of the vehicle.


10. Start path following

After a while after setting the initial position with rviz, path following starts.
result_waypoint_follower

Click here to check the node graph when this example is executed. The node generated by pure_pursuit_sl is / pure_pursuit_sl_81473.

11. Clean up

Execute the following command to finish.

set_param(model, 'SimulationCommand', 'Stop');
close_system(model);
rosshutdown();
rmpath(pure_pursuit_folder);
clear('model', 'pure_pursuit_folder');

Demo Video

How to use pure_pursuit_sl.slx