-
Notifications
You must be signed in to change notification settings - Fork 0
/
user.py
executable file
·47 lines (36 loc) · 1011 Bytes
/
user.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/usr/local/bin/hrpsysjy
import os
import sys
import socket
import traceback
import math
import time
import java.lang.System
import rtm
import waitInput
#import bodyinfo
import OpenHRP
from OpenHRP.RobotHardwareServicePackage import SwitchStatus
from org.omg.CORBA import *
from org.omg.CosNaming import *
from org.omg.CosNaming.NamingContextPackage import *
from com.sun.corba.se.impl.encoding import EncapsOutputStream
from java.lang import System, Class
from RTC import *
from RTM import *
from OpenRTM import *
from _SDOPackage import *
import string, math, socket, time, sys
global rootnc, nshost
java.lang.System.setProperty('NS_OPT', '-ORBInitRef NameService=corbaloc:iiop:localhost:2809/NameService')
rtm.initCORBA()
global kobuki
kobuki= rtm.findRTC("MobileRobot0")
if kobuki==None:
print "no robot"
prof = kobuki.port("vel").get_port_profile()
prop = prof.properties
for p in prop:
print "kobu",p.name
if p.name == "dataport.data_type":
print p.value.extract_string()