-
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.
add openrave-YarpPluginLoader-robotmanager.py
Robot capable of connecting with rd, for asrob-uc3m/robotDevastation-robots#36
- Loading branch information
1 parent
e26695d
commit f4e9792
Showing
1 changed file
with
27 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,27 @@ | ||
#!/usr/bin/env python | ||
|
||
import openravepy | ||
from openravepy import * | ||
|
||
try: | ||
RaveInitialize() | ||
|
||
if not RaveLoadPlugin('OpenraveYarpPluginLoader'): | ||
raveLogError("Plugin not correctly loaded") | ||
|
||
env=Environment() | ||
env.SetViewer('qtcoin') | ||
env.Load('/usr/local/share/robotDevastation-openrave-models/contexts/openrave/ecro/mapping_room.env.xml') | ||
|
||
OpenraveYarpPluginLoader1 = RaveCreateModule(env,'OpenraveYarpPluginLoader') | ||
print OpenraveYarpPluginLoader1.SendCommand('open --device RobotServer --subdevice YarpOpenraveRobotManager --robotIndex 0 --physics ode') | ||
|
||
OpenraveYarpPluginLoader2 = RaveCreateModule(env,'OpenraveYarpPluginLoader') | ||
print OpenraveYarpPluginLoader2.SendCommand('open --device RGBDSensorWrapper --subdevice YarpOpenraveRGBDSensor --robotIndex 0 --sensorIndex 0') | ||
|
||
while 1: | ||
pass | ||
|
||
finally: | ||
RaveDestroy() | ||
|