Skip to content

Commit

Permalink
feat: add shell script chapter2 (#44)
Browse files Browse the repository at this point in the history
* Create shell script for exmaple_02_02, 02_03, 02_04

* Bug fix

* Delete comment

* Rename shell scripts

* style(pre-commit): autofix

Signed-off-by: Takagi, Isamu <[email protected]>

---------

Signed-off-by: Takagi, Isamu <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
  • Loading branch information
KariControl and isamu-takagi authored Jun 18, 2024
1 parent 060e3e8 commit ea7149b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/autoware_practice_course/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ if(BUILD_TESTING)
ament_lint_auto_find_test_dependencies()
endif()

install(PROGRAMS
src/velocity_planning/scripts/run_02_02.sh
src/velocity_planning/scripts/run_02_03.sh
src/velocity_planning/scripts/run_02_04.sh
DESTINATION lib/${PROJECT_NAME}
)
ament_auto_package()
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#! /usr/bin/env bash
# Autoware_practice 第2章の02-02を一括実行するためのスクリプト
source install/setup.bash
gnome-terminal -- ros2 launch autoware_practice_launch practice.launch.xml
sleep 1s # ノード同時起動防止
gnome-terminal -- ros2 topic echo /localization/kinematic_state
gnome-terminal -- ros2 run autoware_practice_course p_controller --ros-args -p kp:=5.0 -p target_velocity:=1.0
gnome-terminal -- ros2 bag record -o velocity.bag /localization/kinematic_state
gnome-terminal -- ros2 run plotjuggler plotjuggler
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /usr/bin/env bash
# Autoware_practice 第2章の02-03(速度計画)を一括実行するためのスクリプト
source install/setup.bash
gnome-terminal -- ros2 launch autoware_practice_launch practice.launch.xml
sleep 1s # ノード同時起動防止
gnome-terminal -- ros2 run plotjuggler plotjuggler
sleep 60s # plotjugglerの設定するための待機時間
gnome-terminal -- ros2 run autoware_practice_course trajectory_loader --ros-args -p path_file:=src/autoware_practice_course/config/trajectory.csv
sleep 1s # ノード同時起動防止
gnome-terminal -- ros2 run autoware_practice_course longitudinal_controller --ros-args -p kp:=5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#! /usr/bin/env bash
# Autoware_practice 第2章の02-04(横制御)を一括実行するためのスクリプト
source install/setup.bash
gnome-terminal -- ros2 launch autoware_practice_launch practice.launch.xml
sleep 1s # ノード同時起動防止
gnome-terminal -- ros2 run plotjuggler plotjuggler
sleep 60s # plotjugglerの設定するための待機時間
gnome-terminal -- ros2 run autoware_practice_course trajectory_loader --ros-args -p path_file:=src/autoware_practice_course/config/trajectory_zigzag.csv
sleep 1s # ノード同時起動防止
gnome-terminal -- ros2 run autoware_practice_course trajectory_follower --ros-args -p kp:=5.0 -p lookahead_distance:=5.0

0 comments on commit ea7149b

Please sign in to comment.