Skip to content

Commit

Permalink
add openrave-YarpPluginLoader-robotmanager.py
Browse files Browse the repository at this point in the history
Robot capable of connecting with rd, for asrob-uc3m/robotDevastation-robots#36
  • Loading branch information
jgvictores committed Dec 13, 2017
1 parent e26695d commit f4e9792
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions examples/openrave-YarpPluginLoader-robotmanager.py
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()

0 comments on commit f4e9792

Please sign in to comment.