PDA

View Full Version : 3D Head Tracking Tutorial - Part 1



Pi Robot
03-04-2011, 06:57 PM
Hello ROS fans,

I put together Part 1 of a "3D Head Tracking" tutorial using ROS and AX-12+ servos. Part 1 covers the use of the ROS tf library to point the head at different locations in space relative to different frames of reference. Part 2 (not yet written!) will cover 3D object detection using the Kinect and the ROS PCL and OpenNI libraries.

Here's the link to Part 1:

http://www.pirobot.org/blog/0018/

--patrick

kwc
03-05-2011, 12:09 AM
Thanks!

Peter_heim
03-16-2011, 03:57 AM
Hi Patrick
Very nice tutorial my usb2dynamixel came in the post yesterday and i had it running in a few hours.
previously i had a hard time working out reference frames but the tutorial cleared it up nicely.
I had 1 problem compling the AX12 core (with Diamondback) it required PR2_controllers. Afterwards it worked the head pointing action was smooth. I then tried the GUI and i get the following error

Traceback (most recent call last):
File "/home/peter/ros/pi-robot-ros-pkg/pi_tutorials/pi_head_tracking_3d_part1/bin/head_pointer_gui.py", line 183, in <module>
frame = PointHeadGUI(None, True)
File "/home/peter/ros/pi-robot-ros-pkg/pi_tutorials/pi_head_tracking_3d_part1/bin/head_pointer_gui.py", line 74, in __init__
self.update_combobox()
File "/home/peter/ros/pi-robot-ros-pkg/pi_tutorials/pi_head_tracking_3d_part1/bin/head_pointer_gui.py", line 128, in update_combobox
self.frameComboBox.SetItems(self.frames)
AttributeError: 'ComboBox' object has no attribute 'SetItems'


regards peter

Pi Robot
03-16-2011, 04:59 PM
Hi Peter,

Glad to hear you got most of it working. As for the GUI errors, it may be that you need an updated version of wxWidgets. On my Ubuntu 10.04 machine, I have python-wxgtk2.8 so perhaps upgrade yours to 2.8 if its anything lower: something like this:

$ sudo apt-get install python-wxgtk2.8 python-wxtools wx2.8-i18n libwxgtk2.8-dev libgtk2.0-dev
--patrick

Peter_heim
03-16-2011, 05:19 PM
Hi Patrick

I have python-wxgtk2.8 so perhaps upgrade yours to 2.8 if its anything lower

I must have a older version on my desktop, when i transfered the head assy to the robot the GUI worked

peter

Pi Robot
03-16-2011, 05:28 PM
Great! I haven't yet figured out how to place a non-ROS dependency in the manifest.xml file...

--patrick

Peter_heim
03-16-2011, 05:59 PM
Patrick
How dose ROS handle linear motion? I need to make my robots head telescope 20cm up and down (to fit under a bench)
I can do it with pullies and a motor but how do i change the frame ref for the altered height?

peter

Pi Robot
03-16-2011, 06:09 PM
Hi Peter,

I believe you would just add a "prismatic" joint to your URDF or Xacro model. Check out Section 4 called "The Gripper Arm" on the following ROS Wiki page:

http://www.ros.org/wiki/urdf/Tutorials/Building%20a%20Movable%20Robot%20Model%20with%20UR DF

--patrick

lnxfergy
03-19-2011, 12:16 AM
Great! I haven't yet figured out how to place a non-ROS dependency in the manifest.xml file...

--patrick

Patrick, take a look at rosdep -- http://www.ros.org/wiki/rosdep

-Fergs

Pi Robot
03-19-2011, 08:37 AM
Thanks Fergs, that's exactly what I needed. So I have added the following line to the manifest.xml file:
<rosdep name="wxpython"/>

--patrick