-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
weather nodes to AWS repository, keyboard: new layout, mount add offs…
…et setting
- Loading branch information
1 parent
6085136
commit 896164f
Showing
20 changed files
with
461 additions
and
1,525 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 |
---|---|---|
@@ -1,29 +1,52 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import rosgraph | ||
import rospy | ||
import os | ||
import sys | ||
from arom.srv import * | ||
from arom.msg import * | ||
|
||
class AromNode(): | ||
def __init__(self): | ||
try: | ||
rosgraph.Master('/rostopic').getPid() | ||
except Exception, e: | ||
print ("Unable to communicate with master!") | ||
print ("Try start ROSCORE or ROSLAUNCH some project") | ||
sys.exit(0) | ||
#raise e | ||
|
||
if self.node_pymlab: | ||
self.pymlabService = rospy.ServiceProxy('pymlab_drive', PymlabDrive) | ||
try: | ||
if self.node_pymlab: | ||
#self.pymlabService = rospy.ServiceProxy('pymlab_drive', PymlabDrive) | ||
self.pymlab = rospy.ServiceProxy('pymlab_drive', PymlabDrive) | ||
rospy.set_param('/arom/node'+rospy.get_name()+"/pymlab", True) | ||
else: | ||
rospy.set_param('/arom/node'+rospy.get_name()+"/pymlab", False) | ||
except Exception, e: | ||
print rospy.get_name() | ||
rospy.set_param('/arom/node'+rospy.get_name()+"/pymlab", False) | ||
|
||
print "Starting init" | ||
rospy.init_node(self.node_name) | ||
rospy.set_param('/arom/node'+rospy.get_name()+"/type", self.node_type) | ||
self.node_name = rospy.get_name() | ||
print "Init done:", rospy.get_name() | ||
|
||
def set_feature(self, name, value): | ||
rospy.set_param('/arom/node%s/feature/%s' %(str(rospy.get_name()),name), value) | ||
rospy.loginfo("New feature '%s' for %s" %(rospy.get_name(), name)) | ||
|
||
''' | ||
def pymlab(self, *args, **kwds): | ||
self.pymlabService(**kwds) | ||
class Pymlab(): | ||
def __init__(self): | ||
self.serv = rospy.ServiceProxy('pymlab_drive', PymlabDrive) | ||
class Pymlab(): | ||
def __init__(self): | ||
self.serv = rospy.ServiceProxy('pymlab_drive', PymlabDrive) | ||
def send(self, device=None, method=None, parameters=None): | ||
return self.serv(device=device, method=method, parameters=parameters) | ||
def send(self, device=None, method=None, parameters=None): | ||
return self.serv(device=device, method=method, parameters=parameters) | ||
''' |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.