forked from jsk-ros-pkg/jsk_aerial_robot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Ninja][Remote Access] [WIP] Create script to launch bringup.launch.
- Loading branch information
1 parent
9083e1e
commit 1a69cde
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env python | ||
import subprocess | ||
import time | ||
import sys | ||
|
||
sys.stdout.reconfigure(line_buffering=True) | ||
|
||
def launch_node(): | ||
process = subprocess.Popen(['roslaunch', 'ninja', 'bringup.launch', 'robot_id:=1']) | ||
print("ok") | ||
return process | ||
|
||
if __name__ == '__main__': | ||
try: | ||
process = launch_node() | ||
while True: | ||
time.sleep(0.1) | ||
|
||
except KeyboardInterrupt: | ||
process.terminate() | ||
process.wait() |