accessing other sensors in real-time controller
From a real-time controller, I can access joint positions and motor current. How would I access wrist accelerometer data and Force-Torque data in a real-time way. I will not be able to subscribe to the topics that publish those sensors from the real-time loop.
My guess is that I have to modify the ethercat driver here: https://github.com/PR2/pr2_ethercat_drivers/blob/master/ethercat_hardware/src/wg06.cpp so that the force/torque and acceleration measurements are available not only through the topic.
I am trying to follow the pathway from encoder counts, to joint position, through pr2_mechanism_model
, since joint positions are accessible from the real-time loop, and use that as an example of how I'd use the sensors.
I realize I can design a non-real-time control loop that subscribes to any topic.
Asked by gustavogoretkin on 2015-02-26 17:02:37 UTC
Answers
pr2_hardware_interface provides the necesssary API [1]
This tutorial [2] fleshes out an example of how to access the accelerometer from the real-time loop. The Force-Torque sensor provides a similar interface, so long as you have a version of pr2_ethercat_drivers that exposes the sensor [3].
[1] http://docs.ros.org/api/pr2_hardware_interface/html/
[2] http://wiki.ros.org/ethercat_hardware/Tutorials/GripperAccelerometerController
[3] https://github.com/PR2/pr2_ethercat_drivers/commit/0da581dd094e02bcfbc093fe11cc90ad48e9bc91
Asked by gustavogoretkin on 2015-03-11 11:31:19 UTC
Comments