Open mikepurvis opened 9 years ago
Not sure if ros_controllers has an implementation -- but that sounds like http://docs.ros.org/api/control_msgs/html/action/PointHead.html
If the PointHead
action fits well your needs, the typical way to use it is to set up a joint_trajectory_controller
for your pan-tilt unit, and a node that converts PointHead
goals to joint_trajectory_controller
commands. This node is not a controller in itself, just a pan-tilt IK solver with some convenience code on top.
We have a node that does this, but the code is currently not public. @mikepurvis, if we make it available, would you put it in shape (make sure it's robot-agnostic, check docs, write tests) to be added as part of ros_controllers
?.
@jordi-pages, @bmagyar
As it might be related: I am currently using a twist_controller based on http://rock-robotics.org/master/api/control/kdl/classKDL_1_1ChainIkSolverVel__wdls.html to make arbitrary kinematic chains "look at" and "follow" a given (tf-)Frame. I therefore use a URDF component, that I call lookat, which extends the kinematic description of the robot to account for the "virtual" view axis. We then are able to "lookat" and "follow" with our sensor mounted on actuators that are not classic PTUs, but consist of any kinematic chain, e.g. 3-4 DoF. At the moment we are trying to solve problems related to the IkSolverVel running into singularities...
(It's WIP and not yet integrated into ros_control...)
@adolfo The reem_head_action that we've been using is really close to the former pr2_head_action, which is quite wired for the pr2, but nothing serious (topic name, assumptions about pan range).
I started working on one that brings these 2 together by using the pr2_head_action from the pr2 catkin package, but haven't had time yet to test it. I was looking for robots that have public simulation and are in need of a similar functionality, but couldn't find many that is not from PAL :)
https://github.com/bmagyar/head_action
I think with the code from PAL we could contribute a bit to this, since @jordi-pages fixed some issues. I could also spend a little bit more time on this to finish it properly and make tests with several robots. The package ownership could be transferred to the PAL account.
@adolfo-rt I'd love to, but the timeline would be on the order of months.
In terms of improving the accessibility of these devices to our users, I suspect that a generic PTU interactive marker server might have more impact in the short term.
I agree with @bmagyar that fusing the reem_head_action from his account with the in-house version in PAL and transferring it to the PAL account would be the best starting point.
@adolfo-rt
I will take a look at what else needs to be cleaned there, I'm familiar with creating new controllers already ;)
What I would need help with, is a list of robots that I could test this on. At the time I started working on this I was unable to find a PR2 that worked on hydro (I guess this changed now), and could only find a Robonaut2 that is unofficial and for some reason it was blowing up in my gazebo. I would appreciate if some of you could drop a few links to working simulation for robots that need pan-tilt.
Unfortunately, I don't have a good example of a full robot simulator. The FLIR PTUs typically go on Husky with a SICK or ethernet camera attached—similar story with the Axis PTU cams.
FLIR D46 does have a description, but I'm not actually sure what's required to get from a description to a gazebo plugin.
This should be fairly simple. I'm not sure how motivated you are to set up such a unit in gazebo, but a model could be added that has a pedestal with this pan-tilt unit on top of it with a camera. What is basically missing is some transmissions, and a gazebo plugin (a naive ros_control hardware abstraction layer could be used).
Proving how great the controller is on REEM and REEM-C might be a bit biased if I do it :) I'd like to have something different that should also work.
@bmagyar you could take a look at this two robots:
The Pi Robot: https://github.com/pirobot/rbx2
and the UBR-1 robot (which it is stated to work with Hydro and Gazebo 1.9): https://github.com/unboundedrobotics/ubr1_preview
I moved the repo to the PAL organization, if you'd like to track it.
We've shipped a number of flir PTUs, as well as some Axis IP cameras with integrated pan-tilt— it'd be great to have a controller with interfaces for look at, follow, etc.
Does something like this exist?