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

Amin's profile - activity

2016-05-08 15:50:39 -0500 received badge  Nice Answer (source)
2014-12-24 02:41:38 -0500 received badge  Famous Question (source)
2014-01-28 17:25:33 -0500 marked best answer disabling kinect accelerometer

Hi ROS folks,

I wonder if there is any way to shut down kinect accelemotor. I need to mount the kinect in angular way and still have the full tilting range. Accelemotor prevents kinect to go towards up even though it is looking down! I looked at kinect_aux, there are all of the controls except this.

Any advice?

2014-01-28 17:25:29 -0500 marked best answer Multiple kinect static transform

Hi,

I'm trying to use RGBDSlam and Octomap on multiple Kinects. But not simultaneously. I would run one kinect each time. The loop is to slam an area, send the model to octomap server then launch a second camera (and shutting down the first one). The 2nd camera would also do the same thing but I won't restart octomap_server. So it would build up two octomaps after two slams in the server.

I should use a static transform on one kinect. I tried to have two different kinect_frames.launch files feeding to openni_node.launch files, But due to the fact that the cameras are NOT running at the same time, I'm not sure that having one single tf would be the answer for me.

Cameras are mounted back to back. Any advice would be appreciated.

2012-10-18 23:59:42 -0500 received badge  Notable Question (source)
2012-10-18 23:59:42 -0500 received badge  Popular Question (source)
2012-09-15 22:30:09 -0500 received badge  Famous Question (source)
2012-09-15 22:30:09 -0500 received badge  Popular Question (source)
2012-09-15 22:30:09 -0500 received badge  Notable Question (source)
2012-09-09 22:31:31 -0500 received badge  Famous Question (source)
2012-09-09 22:31:31 -0500 received badge  Popular Question (source)
2012-09-09 22:31:31 -0500 received badge  Notable Question (source)
2012-08-27 22:42:59 -0500 received badge  Famous Question (source)
2012-08-27 22:42:59 -0500 received badge  Popular Question (source)
2012-08-27 22:42:59 -0500 received badge  Notable Question (source)
2012-08-15 07:18:07 -0500 received badge  Famous Question (source)
2012-08-15 07:18:07 -0500 received badge  Popular Question (source)
2012-08-15 07:18:07 -0500 received badge  Notable Question (source)
2012-05-26 04:40:21 -0500 received badge  Self-Learner (source)
2012-05-24 20:58:58 -0500 answered a question kinect aux NUI motor

Alright. It solved. You need to identify the device you need through its physical address. In other words, you need to know the topology of your USB ports. What I did was to modify the function openAuxDevice in kinect_aux.cpp to:

void openAuxDevice(int dev_number) {

libusb_device **devs; //pointer to pointer of device, used to retrieve a list of devices
ssize_t cnt = libusb_get_device_list(0, &devs); //get the list of devices
if (cnt < 0) {
    ROS_ERROR("No device on USB");
    return;
}

for (int i = 0; i < cnt; ++i) {

    const int r = libusb_get_device_descriptor(devs[i], &desc);
    if (r < 0)
        continue;

    if ((int) libusb_get_device_address(devs[i]) == dev_number
            && desc.idProduct == MS_MAGIC_MOTOR_PRODUCT && desc.idVendor
            == MS_MAGIC_VENDOR) {
        std::cout << "Kinect with dev no. " << dev_number << " opened."
                << std::endl;
        libusb_open(devs[i], &dev);
        libusb_claim_interface(dev, 0);
    }
}
libusb_free_device_list(devs, 1); // free the list, unref the devices in it
}

Then in the my script I added,

d=$(cat /sys/bus/usb/devices/2-1.1.2/devnum &)
rosparam set device_index $d &
rosrun kinect_aux kinect_aux_node &

Note that, 2-1.1.2 means the second bus, 1st hub, again 1st hub and then port number 2. This is where i connected one of the kinects. The other one is connected to 2-1.2.2.

FYI, you can check these out: http://www.linux-usb.org/FAQ.html#i6 http://reactivated.net/writing_udev_rules.html

2012-05-21 02:09:51 -0500 asked a question kinect aux NUI motor

Hi folks,

I'm using openni_camera and kinect_aux (for tilting function) stacks at the same time and they work well together. The problem came in when I used two kinects connected (they are not used together they are just connected!) and I want to choose one of them at a time. This is straight forward for openni_camera stack where u only need to change launch file to launch the camera with a specified serial number. But for kinect_aux there is no way to choose a specific NUI motor since kinect NUI motor does not have any serial number assigned to it! so when I run "lsusb -v" I see two completely equal NUI motor descriptions with no serial number on different device addresses.

How can I make sure that this motor on bus address e.g. 15 belongs to the kinect camera on bus 17 and not camera on bus 20!? The arrangement of the devices in the list changes randomly every time I unplug and plug or replace the kinects. So I could not find any specific relation between cameras and motors and their bus address numbers!

I only have one bus with three ports. I also should mention that setting "device_index" parameter in kinect_aux does not help since the order of kinects changes on unplugging/plugging.

I copied lsusb -v of one of the motors (the other one looks exactly the same)

Bus 002 Device 016: ID 045e:02b0 Microsoft Corp.
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x045e Microsoft Corp.
  idProduct          0x02b0
  bcdDevice            1.07
  iManufacturer           1 Microsoft
  iProduct                2 Xbox NUI Motor
  iSerial                 0 ---------------------->(no serial provided!)
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           18
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              0
Device Status:     0x0000
  (Bus Powered)
2012-05-09 23:08:32 -0500 asked a question kinect_aux indexing kinect based on serial no.

Hi,

I'm currently using Kinect_aux for multiple kinects. I adjust the device_index param each time I want to switch to another kinect. The point is when I replace the USB connectors or restart the OS the index arrangement changes randomly. So I need to choose a kinect based on its serial no. or any other device specific id.

2012-05-08 22:11:35 -0500 received badge  Scholar (source)
2012-05-02 04:32:55 -0500 answered a question disabling kinect accelerometer

Hi Again,

After some tests, I realized that even using the trick above you are not able to get more than -60 degrees on tilting kinect. In other words, kinect is able to tilt down -30 degrees itself (according to kinecy_aux stack) and at the same time you are also able to mount the kinect stand with about -30 degrees (more than this figure would not have effect since accelerometer does not allow kinect to go down further even though it can go!) so both of them would give 60 degrees.

My goal was to mount the kinect on the ceiling of my room in such a way that the FOV of kinect would be vertical against the ground. By doing that 60 degrees (30 tilting + 30 mounting angle) with a FOV of (43/2 ~ 22) I could get to -82 and not -90!

Any advice on how to come up with accelerometer is appreciated.

2012-05-01 22:59:25 -0500 asked a question headless RGBDSlam .PLY saver

Hi,

I'm using RGBDSlam in headless mode and I would like to save all clouds in one .PLY file. the "rosservice call /rgbdslam/ros_ui save_all" service is saving the into a .PCD file. Is the a parameter that I can add to headless.launch?

I changed the source code in ros_service_ui.cpp . It saves to ply file now but meshlab is not able to load it and gives some error about shader. I guess I'm doing something wrong.

2012-04-26 01:29:31 -0500 received badge  Teacher (source)
2012-04-26 01:29:31 -0500 received badge  Self-Learner (source)
2012-04-24 22:16:40 -0500 answered a question disabling kinect accelerometer

I just found the answer.

in kinect_aux.cpp, simply comment out

angle = (angle<min_tilt_angle) ?="" min_tilt_angle="" :="" ((angle="">MAX_TILT_ANGLE) ? MAX_TILT_ANGLE : angle);

Recompile, and tilt more that 31 or less than -31. I guess you should be very careful to not to over tilt the kinect.

2012-04-24 21:27:46 -0500 received badge  Student (source)