ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

davidcw's profile - activity

2014-04-30 13:11:18 -0500 received badge  Notable Question (source)
2014-04-30 13:11:18 -0500 received badge  Famous Question (source)
2013-05-28 22:04:11 -0500 received badge  Popular Question (source)
2013-03-07 09:48:34 -0500 received badge  Taxonomist
2013-02-12 17:34:55 -0500 asked a question Problem using superimposition_matrix from transformations.py in the tf package

I am trying to find the transformation matrix from one set of points to another, and tried to use the function "superimposition_matrix" (from transformations.py), but am getting unexpected results. I don't know if this is a bug or if I'm just missing something, but I was hoping someone could shed some light on my problem.

The function is defined/described as follows:

def superimposition_matrix(v0, v1, scaling=False, usesvd=True):
    "Return matrix to transform given vector set into second vector set ..."

I've provided a simplified example below to illustrate my confusion. In this example, I am trying to find the transformation matrix from a unit-box centered at the origin, to a 100 side-length box with a corner at the origin. Having calculated the transformation matrix using the function superimposition_matrix(), I do a sanity check by transforming one of the corners of the unit-box, but do not get the expected result.

v0 = numpy.array(((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)))
v1 = numpy.array(((100,0,0),(100,100,0),(0,100,0),(0,0,0)))
tfmatrix = superimposition_matrix(v0, v1, scaling=True, usesvd=True)
pos_orig = numpy.array((0.5,-0.5,0,1))
pos_new = numpy.dot(tfmatrix,pos_orig)
print(pos_new)

The array printed is "[ 48.24860074 -49.14653816 -17.21676633 1. ]" But I would expect the answer to be close to "[100 0 0 1.]"

  • ROS version: Fuerte (Full-Desktop install)
  • OS: Ubuntu 12.04 (Precise)
  • Package: TF (Python)

Any insights would be appreciated. Thanks!

2012-10-24 04:18:05 -0500 received badge  Famous Question (source)
2012-04-28 22:13:59 -0500 received badge  Notable Question (source)
2011-12-15 16:26:38 -0500 received badge  Popular Question (source)
2011-09-02 11:14:16 -0500 marked best answer USB_Cam, Could not open MJPEG Decoder

I fixed up CvCaptureCAM_DShow to allow MJPG and setting of all the webcam parameters. Fixes are against 2.3.0 see https://code.ros.org/trac/opencv/ticket/1281

2011-07-20 08:01:26 -0500 received badge  Student (source)
2011-07-09 06:06:20 -0500 asked a question USB_Cam, Could not open MJPEG Decoder

Whenever I run usb_cam with pixel_format:="mjpeg", I get the following error:

usb_cam video_device set to [/dev/video1]
...
usb_cam pixel_format set to [mjpeg]
[mjpeg @ 0x7fabe40f0160]codec type or id mismatches
Could not open MJPEG Decoder
Segmentation Fault

I'm using a Logitech Webcam Pro 9000, on Ubuntu 11.04, with the latest "usb_cam" downloaded from the bosch-ros-pkg repository. usb_cam works great when I set pixel_format to "yuyv", and I can see the image with image_view. However, the frame rates for "mjpeg" should be 4x higher than "yuyv" at this camera's native resolution (according to the list at http://www.quickcamteam.net/devices/l... ). I would ultimately like to use this webcam to track a 'fast' moving target, one that I should be able to catch at 30fps, but not reliably catch 5-7.5 fps.

I've installed ffmpeg and libavcodec-dev from Ubuntu's software center. I'd be happy to supply any additional information, but I'm not sure what to look for.

  • Thanks!