Ask Your Question

Keerthi Raj's profile - activity

2019-05-20 01:39:06 -0600 marked best answer arv_camera_new() doesn't open the camera when called within a nodelet

Platform Details:

Ubuntu 14.04 LTS Linux Kernel 4.4.0-112-generic

ROS Version: Indigo

ROS Package: camera_aravis from here - https://github.com/linknum23/camera_aravis

Aravis LIbrary - aravis-0.4.1 from here - http://ftp.acc.umu.se/pub/GNOME/sources/aravis/0.4/ . I have also tried version 0.5.11 with same results.

Cameras used (Same behavior with all cameras and all are GigE cameras):

  1. IDS GV-527xFA-C
  2. Allied Vision Mako G-319C
  3. Allied Vision GT1930C

Each camera is tested separately and is powered through PoE (Power over Ethernet) and the Ethernet packet size has been set to 9000 MTU.

Command to run after compiling the package: rosrun camera_aravis camera_node

The node then detects the camera and can print the device ID and also can access Vendor name and other camera specific parameters with Aravis API's. However, the call to arv_camera_new() in src/camera_nodelet.cpp returns NULL or doesn't return at all (hangs).

After trying different debugging methods, I narrowed down the issue to Nodelet manager in src/camera_node.cpp. In the modified camera_node.cpp below, the arv_camera_new() function can detect the camera and return a camera object.

#include <ros/ros.h>
#include <nodelet/loader.h>
#include <camera_aravis/camera_nodelet.h>

int main(int argc, char** argv)
{
  ros::init(argc, argv, "camera_node");
  //nodelet::Loader manager(true);
  //nodelet::M_string remappings;
  //nodelet::V_string my_argv;
  arv_update_device_list();
  printf("Devices: %d\n", arv_get_n_devices());
  ArvCamera *pCamera = arv_camera_new(NULL);
  if(pCamera){
    printf("Device Opened: %s\n",arv_camera_get_vendor_name(pCamera));
  }
  else{
     printf("Device couldn't be opened\n");
  }
  //manager.load(ros::this_node::getName(), "camera_aravis/CameraNodelet", remappings, my_argv);
  ros::spin();
}

As you can see, I have commented out the Nodelet Manager and directly calling the Aravis APIs to access the camera. I also wrote a separate non-ROS C++ program to use Aravis API's and can access the camera without any issues.

Further more, the test scripts provided within aravis library (Ex: tools/arvcameratest.c) work fine and can connect and stream data from the cameras.

So, the symptoms can be bolied down to arv_camera_new() and arv_open_device() (may be other similar APIs which I haven't tested) can find the camera directly in the node, but not when called within the nodelet. Another thing to note is that, other API's such as arv_get_n_devices(), arv_get_device_id() work fine in both node and nodelet.

I have reproduced the issue with two machines with same platform and software versions mentioned above. Note that the code is directly taken from the camera_aravis github repo mentioned above and modifications are only done to camera_node.cpp as shown above while debugging.

What might be going wrong? Anyone experienced similar issues with this package? Any help in debugging would be greatly appreciated.

EDIT:

After digging deeper into Aravis library(0.4.1) and glib (v2.0), I found out that the function g_regex_split behaves differently for a node and nodelet implementation. Below is the function call to g_regex_split in arvgvdevice.c

tokens = g_regex_split (arv_gv_device_get_url_regex (), filename, 0);

For the filename string - local:GV-527xFA-C_1_3_120.zip;70000000;3fd0, the tokens after ... (more)

2018-10-24 13:03:36 -0600 received badge  Notable Question (source)
2018-09-07 14:08:41 -0600 received badge  Popular Question (source)
2018-09-07 12:14:25 -0600 edited question image_proc YUV422 Rectification messes up the colors

YUV422 Rectification messes up the colors Hi, I have an image topic camera/image_color which has images streaming with

2018-09-06 20:07:43 -0600 asked a question image_proc YUV422 Rectification messes up the colors

YUV422 Rectification messes up the colors Hi, I have an image topic camera/image_color which has images streaming with

2018-02-27 10:08:33 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

So, did you have a workaround for this issue in Ubuntu 14.04? What was your solution?

2018-02-22 18:15:31 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

Do you know why the "regex_split.c" test script was created in your package repo? Did you face a similar issue?

2018-02-22 18:12:20 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

Thanks. Even with the updated camera_aravis pkg, the issues exists since the problem is with glib as I have mentioned in

2018-02-22 10:06:15 -0600 received badge  Famous Question (source)
2018-02-21 13:26:56 -0600 edited question arv_camera_new() doesn't open the camera when called within a nodelet

arv_camera_new() doesn't open the camera when called within a nodelet Platform Details: Ubuntu 14.04 LTS Linux Kernel 4

2018-02-21 13:25:18 -0600 edited question arv_camera_new() doesn't open the camera when called within a nodelet

arv_camera_new() doesn't open the camera when called within a nodelet Platform Details: Ubuntu 14.04 LTS Linux Kernel 4

2018-02-20 22:09:48 -0600 received badge  Organizer (source)
2018-02-20 22:07:03 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

@Link, please check the edit to the question details.

2018-02-20 22:05:50 -0600 edited question arv_camera_new() doesn't open the camera when called within a nodelet

arv_camera_new() doesn't open the camera when called within a nodelet Platform Details: Ubuntu 14.04 LTS Linux Kernel 4

2018-02-20 18:32:16 -0600 received badge  Notable Question (source)
2018-02-20 17:09:56 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

Actually that folder is empty. Nothing related to aravis is in /usr

2018-02-20 17:02:05 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

Got this : /usr/local/share/doc/aravis

2018-02-20 17:02:05 -0600 received badge  Commentator
2018-02-20 16:54:49 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

I first tested with 0.5.11 and it didn't work. So, I switched to 0.4 and I have been using that now for most of my debug

2018-02-20 16:54:14 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

I first tested with 0.5.11 and it didn't work. So, I switched to 0.4 and I have been using that now for most of my debug

2018-02-20 16:46:36 -0600 received badge  Popular Question (source)
2018-02-20 15:49:52 -0600 commented answer arv_camera_new() doesn't open the camera when called within a nodelet

Thanks for the response. Yes, as mentioned in the question, the sample programs provided in the aravis library work fine

2018-02-20 12:52:57 -0600 commented question arv_camera_new() doesn't open the camera when called within a nodelet

I have reached out to the fork author. Waiting for their response.

2018-02-19 22:12:19 -0600 asked a question arv_camera_new() doesn't open the camera when called within a nodelet

arv_camera_new() doesn't open the camera when called within a nodelet Platform Details: Ubuntu 14.04 LTS Linux Kernel 4

2018-02-19 17:50:27 -0600 commented question Difference in loading 3rd party lib from Node vs. Nodelet

I have the same issue right now. Did this ever get resolved?

2016-08-17 09:35:27 -0600 received badge  Famous Question (source)
2015-04-21 15:30:05 -0600 marked best answer How to interpret the raw depth image data?

Hello,

I want to get the distance of an object from the depth sensor(Primesense). I am able to subscribe to all the topics. I am not sure which one to use for my purpose. I tried using "/camera/depth_registered/image_rect_raw" topic.

I have the following information from the topic:

Image Height: 480
Image Width: 640
Encoding: 16UC1
Is Big Endian ?: 0
Step: 1280

The data looks like this:

2  86  2  85  2  85  2  85  2  84  2  84  2  83  2  82  2  82  2  82  2  82  2  82  2  82  2  82  2  82  2  81  2  81  2  81  2  81  2  80  2  80  2  78  2  77  2  75  2  75  2  63  2  63  2  62  2  61  2  60  2  59  2  59  2  58  2  58  2  57  2  57  2  57  2  57  2  56  2  57  2  56  2  57  2  58  2  58  2  58  2  58 ..............

But I don't know what these array of bytes indicate. It would be very helpful if someone can teach me How to get the distance from this data?

Thanks in advance.

2014-09-27 16:55:28 -0600 received badge  Famous Question (source)
2014-07-14 02:56:57 -0600 received badge  Notable Question (source)
2014-07-14 02:52:03 -0600 received badge  Popular Question (source)
2014-07-14 02:49:21 -0600 received badge  Popular Question (source)
2014-07-14 02:49:21 -0600 received badge  Notable Question (source)
2014-07-12 22:26:02 -0600 commented answer How to call functions defined in an external C file from a ROS package?

@Sai, Thank you very much. It was such a simple thing.

2014-07-12 18:31:53 -0600 asked a question How to call functions defined in an external C file from a ROS package?

Hi,

I have a C file(cluster.c) and a header file(cluster.h) which are not a part of any ROS package. I want to call functions in that C file from my already existing ROS package's source file(detect.cpp). Note that "cluster.c" is just a collection of some C functions without a main(). So, it can't be compiled separately.

I thought of creating a library out of "cluster.c" and "cluster.h" and link that library to my ROS package? How do I do this? What changes should I make to my existing package's CMakeLists.txt and package.xml?

This may be a silly and repeated question as I found similar questions being answered. As I am very new to ROS I couldn't understand much from those answers. If someone could explain me in simple terms, it would be great.

Thanks, Raj

2014-02-14 08:59:29 -0600 received badge  Enthusiast
2014-02-12 02:47:58 -0600 commented answer hydro + kinect + Ubuntu 12.04 library issue?

How to find the library which is holding this symbol? Sorry, I am totally new to ROS.

2014-02-10 10:39:16 -0600 received badge  Famous Question (source)
2014-02-10 10:38:21 -0600 asked a question Has anyone modeled noise in kinect grayscale images?

I want to model the noise in kinect's grayscale or RGB images. If anyone has done that before, please share any documentation. I got a couple of papers where noise modelling was done for depth measured by kinect but couldn't find anything for grayscale or RGB images.

Thanks, Raj

2014-02-01 06:50:41 -0600 answered a question hydro + kinect + Ubuntu 12.04 library issue?

Even I am experiencing the same issue except that the undefined symbol is different:

/opt/ros/hydro/lib/nodelet/nodelet: symbol lookup error: /opt/ros/hydro/lib//libopenni_nodelet.so: undefined symbol: _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv

If I type

c++filt _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv

I get,

openni_wrapper::OpenNIDevice::getSerialNumber()

and I type:

nm -D /opt/ros/hydro/lib/*.so | grep -i "T _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv"

I get:

00000000000233a0 T _ZN14openni_wrapper12OpenNIDevice15getSerialNumberEv

Can someone explain what does this mean and how to fix it? Note that I installed latest ROS hydro on 28th Jan and checked that ROS is up-to-date by running sudo apt-get update and sudo apt-get dist-upgrade today (1st Feb).

Thanks, Raj

2014-01-21 02:23:25 -0600 received badge  Supporter (source)
2014-01-21 02:23:25 -0600 marked best answer How to do camera calibration for Primesense?

Hello there,

I want to calibrate my Carmine 1.09 depth sensor. I am using a tutorial "How to Calibrate a Monocular Camera" in ROS.

It asks me to find the topic "/camera/image_raw". However, I don't have such topic, instead I have following similar topics

"/camera/depth/image_raw"
"/camera/depth_registered/image_raw"
"/camera/ir/image_raw"
"/camera/rgb/image_raw"

I tried to calibrate the camera using "camera/depth/image_raw" with the following command:

rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/camera/depth/image_raw camera:=/camera/depth

Is this command correct? If I run this command, I get a message like this:

Waiting for service /camera/depth/set_camera_info ...
Service not found

Do I need to make any changes to the code in cameracalibrator.py? Please let me know the right way to calibrate?

Thanks in advance.

2014-01-21 02:22:40 -0600 received badge  Scholar (source)
2014-01-13 02:54:54 -0600 received badge  Famous Question (source)
2013-12-23 07:23:44 -0600 commented answer How to do camera calibration for Primesense?

It worked. It was taking lot of time to process and my PC didn't respond for some time. So, I thought it was hung. Anyways, I was able to calibrate the camera. Thank you very much.

2013-12-22 07:27:02 -0600 received badge  Notable Question (source)
2013-12-22 07:23:37 -0600 commented answer How to do camera calibration for Primesense?

Thanks joanpau. I ran the calibration for "camera/rgb/camera_info". But, when I hit the calibrate button, the display window hangs and the respective terminal also hangs and calibration will not end. Any idea why this happens?