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

Revision history [back]

Finally I have achieved that i want. I have followed the suggestions of @130s and I have added other things that were necessary.

Perhaps my solution is not the best one or there are another possibilities, but it works perfect.
To obtain a custom ImageView plugin for each camera, I have done the following:

  • I've copied the original code of imageView into my own package.
  • I've modified some lines in the code for getting the image topic that i want for each camera.
  • I've created one class for each camera. (This is necessary because you need to instantiate the classes in the "plugin.xml" file and the attribute must be different for each instance)
  • I only use one .ui file. All the classes are using the same file:
--- CMakelist.txt ---
    set(my_cameras_UIS  src/my_cameras/image_view.ui)
  • The main concept to understand is in plugin.xml:

image description

The Class name tag must be different for each instance.

I have obtained this:

image description

Hopefully this will be useful for others.