Skip to content

Commit 736ce0f

Browse files
committed
added start script for the rock tutorial with joystick support
1 parent d38a661 commit 736ce0f

2 files changed

Lines changed: 25 additions & 0 deletions

File tree

‎manifest.xml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<!-- rock library dependencies -->
1616
<depend package="tutorials/rock_tutorial" />
1717
<depend package="base/types" />
18+
<depend package="drivers/orogen/controldev" />
1819

1920
<versioncontrol type="git" url="" />
2021
<export>

‎scripts/startRockTutorial.rb‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
require 'orocos'
2+
require 'readline'
3+
include Orocos
4+
5+
Orocos.initialize
6+
7+
Orocos.run 'rock_tutorial', 'joystick_local' do
8+
9+
rockControl = TaskContext.get 'rock_tutorial_control'
10+
rockVisualization = TaskContext.get 'rock_tutorial_visualization'
11+
joystickLocal = TaskContext.get 'joystick_local'
12+
13+
joystickLocal.motion_command.connect_to rockControl.motion_command
14+
rockControl.pose.connect_to rockVisualization.pose
15+
16+
joystickLocal.configure
17+
joystickLocal.start
18+
19+
rockControl.start
20+
rockVisualization.start
21+
22+
Readline::readline('Press enter to exit')
23+
24+
end

0 commit comments

Comments
 (0)