Commit 2ee79510 authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel

Use RosPublish instead of RosImport

parent 6ee9bbd2
......@@ -27,7 +27,7 @@ class Supervisor(object):
def setupEvents (self):
from dynamic_graph_hpp.sot import Event, CompareDouble
from dynamic_graph.sot.core.operator import Norm_of_vector
from dynamic_graph.ros import RosImport
from dynamic_graph.ros import RosPublish
self.norm = Norm_of_vector ("control_norm")
plug (self.sotrobot.device.control, self.norm.sin)
......@@ -40,11 +40,11 @@ class Supervisor(object):
# self.sotrobot.device.after.addSignal (self.norm_event.check.name)
self.sotrobot.device.after.addSignal ("control_norm_event.check")
self.norm_ri = RosImport ('ros_import_control_norm')
self.norm_ri.add ('double', 'event_control_norm', '/sot_hpp/control_norm_changed')
plug (self.norm.sout, self.norm_ri.event_control_norm)
# plug (self.norm_event.trigger, self.norm_ri.trigger)
self.norm_event.addSignal ("ros_import_control_norm.trigger")
self.ros_publish = RosPublish ('ros_publish')
self.ros_publish.add ('double', 'event_control_norm', '/sot_hpp/control_norm_changed')
plug (self.norm.sout, self.ros_publish.event_control_norm)
# plug (self.norm_event.trigger, self.ros_publish.trigger)
self.norm_event.addSignal ("ros_publish_control_norm.trigger")
def makeInitialSot (self):
# Create the initial sot (keep)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment