how to connect orocos component port with ros node topic?
xudong0401 opened this issue · comments
hi,
I have read the README.md of rtt_roscomm, https://github.com/orocos/rtt_ros_integration/tree/toolchain-2.9/rtt_roscomm , but I still not know how use it ,can you an example or a sample program ?
The below is my start.ops, but I am not sure if it is right, because the program does not work . And the program network address is https://github.com/xudong0401/urg_laser.
import("rtt_ros")
import("rtt_roscomm")
#import("rtt_rosnode")
path("/urg_laser_test/rtt_ros_component/obstacles_orocos/build/devel/lib/orocos")
ros.import("obstacles_orocos")
loadComponent("obstacles","SubscribeAndPublish")
path("/urg_laser_test/rtt_ros_component/scan_rectifier_orocos/build/devel/lib/orocos")
ros.import("scan_rectifier_orocos")
loadComponent("scanrectifier","ScanRectifier")
path("/urg_laser_test/rtt_ros_component/serial_port_orocos/build/devel/lib/orocos")
ros.import("serial_port_orocos")
loadComponent("serial","SerialPortTest")
setActivity("obstacles",0.0,80,ORO_SCHED_RT)
setActivity("serial",0.0,79,ORO_SCHED_RT)
setActivity("scanrectifier",0.0,78,ORO_SCHED_RT)
stream("scanrectifier.sub_",ros.topic("scan_filtered"))
connectPeers("scanrectifier","obstacles")
connectPeers("obstacles","serial")
scanrectifier.start()
obstacles.start()
serial.start()