Ask Your Question

sam_123's profile - activity

2021-07-28 08:48:29 -0600 received badge  Nice Question (source)
2019-04-27 16:59:40 -0600 received badge  Famous Question (source)
2019-02-07 01:22:50 -0600 marked best answer ROS Melodic OpenCV xfeatures2d

On ROS Melodic ros-melodic-opencv3 doesn't exist anymore as e.g. on ROS Kinetic. Instead it is recommended to install libopencv-dev http://wiki.ros.org/melodic/Migration... , however, this package does not contain xfeatures2d, neither does libopencv-contrib-dev.

How am I supposed do install xfeatures2d (SURF, SIFT, etc.)? Do I have to build OpenCV 3 now from source?

2019-02-07 01:22:35 -0600 commented answer ROS Melodic OpenCV xfeatures2d

Yeah, I build now our own OpenCV Contrib debian packages. No idea why they didn't include all the contrib features into

2019-02-07 01:21:55 -0600 commented answer ROS Melodic OpenCV xfeatures2d

Yeah, I build now our own OpenCV Contrib debian packages.

2019-01-31 03:03:10 -0600 received badge  Famous Question (source)
2019-01-28 10:13:42 -0600 received badge  Notable Question (source)
2019-01-21 00:45:10 -0600 received badge  Popular Question (source)
2019-01-18 16:46:40 -0600 received badge  Notable Question (source)
2019-01-14 03:01:16 -0600 asked a question ROS Melodic OpenCV xfeatures2d

ROS Melodic OpenCV xfeatures2d On ROS Melodic ros-melodic-opencv3 doesn't exist anymore as e.g. on ROS Kinetic. Instead

2019-01-01 15:35:34 -0600 received badge  Popular Question (source)
2018-12-20 04:47:28 -0600 edited question [YAML parser] ROS2 get parameters from sequences

[YAML parser] ROS2 get parameters from sequences I give a yaml file as a parameter to a ROS2 (crystal) node and want to

2018-12-20 04:39:38 -0600 asked a question [YAML parser] ROS2 get parameters from sequences

[YAML parser] ROS2 get parameters from sequences I give a yaml file as a parameter to a ROS2 node and want to read a seq

2016-08-08 18:17:54 -0600 received badge  Famous Question (source)
2015-10-12 00:41:46 -0600 received badge  Notable Question (source)
2015-10-09 15:41:50 -0600 received badge  Popular Question (source)
2015-10-09 01:34:19 -0600 asked a question add rqt plugin to QMainWindow as QDockWidget (C++)

I have several rqt plugins all written in C++ and want to write my own simple "plugin manager" instead of using the ROS rqt manager. For that I wrote a main.cpp that creates a QMainWindow, than I created a new object of my rqt plugin class.

1. attempt casting MyPlugin to QDockWidget

I tried to cast this object to a QDockWidget. However that doesn't work. What I get is the following error without a window:

[FATAL] [1444370401.501434073]: You must call ros::init() before creating the first NodeHandle
Couldn't find an AF_INET address for []
Couldn't find an AF_INET address for []
[ERROR] [1444370401.502916301]: [registerPublisher] Failed to contact master at [:0].  Retrying...
Couldn't find an AF_INET address for []

Then I added the line ros::init(argc, argv, "rqt_mypkg");, however that crashes the program and I get a Segmentation fault (core dumped)

2. attempt casting MyPlugin to QWidget and add it to a QDockWidget

This results in the same error as above, however if I add the line ros::init(argc, argv, "rqt_mypkg"); I get a window with the QDockWidget but without the rqt plugin itself.

My main.cpp I used:

#include "rqt_mypkg/my_plugin.h"

#include <QMainWindow>
#include <QApplication>
#include <QDockWidget>
#include <QWidget>

#include <ros/ros.h>

using namespace rqt_mypkg;

int main( int argc, char **argv ) {

    // create an application
    QApplication a( argc, argv );

    // tried with and without this line
//    ros::init(argc, argv, "rqt_mypkg");

    // create main window
    QMainWindow w;

    // new rqt plugin
    MyPlugin* myPlugin;
    myPlugin = new MyPlugin();

    // 1. attempt by casting myPlugin to a QDockWidget
    QDockWidget *dockWidget = qobject_cast<QDockWidget*>(myPlugin);
    dockWidget->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
    w.addDockWidget(Qt::RightDockWidgetArea, dockWidget);

    // 2. attempt by casting myPlugin to a QWidget and add it to a QDockWidget
//    QWidget *widget = qobject_cast<QWidget*>(myPlugin);
//    QDockWidget *dock = new QDockWidget();
//    dock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
//    dock->setWidget(widget);
//    w.addDockWidget(Qt::RightDockWidgetArea, dock);    

    // show main window
    w.show();
    return a.exec();
}

The whole package including the rqt plugin is on GitHub

https://github.com/samuelba/rqt_mypkg

2015-07-23 03:39:35 -0600 received badge  Famous Question (source)
2015-07-18 03:12:00 -0600 commented answer where in the rqt source code is the tab handling?

Well, I don't wanna lose the advantage of the ability to combine different plugins. Not every project / setup needs the same plugins, so combining all of them in a single rqt plugin isn't really the way I wanna go. I'll try the "dark valley", if something useful comes out of it, I'll post it here.

2015-07-18 03:03:30 -0600 received badge  Notable Question (source)
2015-07-17 17:30:03 -0600 received badge  Popular Question (source)
2015-07-17 15:03:59 -0600 commented answer where in the rqt source code is the tab handling?

so if I understand you right, the best approach would be to create my own QMainWindow and add there my rqt plugins in a QDockWidget, right? Do you know how I can do that (all my rqt plugins are in C++)?

2015-07-17 14:56:01 -0600 commented answer where in the rqt source code is the tab handling?

I extended my post to explain a bit better what I want

2015-07-17 14:39:53 -0600 commented answer where in the rqt source code is the tab handling?

I added a picture in my first post, where you can see the tabs I mean. You can do them by open rqt and adding several rqt plugins, then move them on top of each other.

2015-07-17 14:38:27 -0600 received badge  Editor (source)
2015-07-17 10:17:39 -0600 commented question where in the rqt source code is the tab handling?

yes I meant tabs like in the browser. Ok, than I guess it's impossible to switch between these tabs from a ros node.

2015-07-17 09:40:32 -0600 asked a question where in the rqt source code is the tab handling?

Hi

I would like to know where I can find the rqt perspective tab handling, e.g. where in the source code are they created?

I guess it's somewhere in the qt_gui_core ( https://github.com/ros-visualization/... ), but I couldn't find anything.

edit: I mean the tabs in the picture below (open rqt and add some plugins over each other):

image description

Explanation of my goal: I want to add several rqt plugins (mostly my own plugins), add them to a single rqt perspective and create tabs like in the picture above. Then I want do switch between this tabs from a ros node, depending on which tab is most relevant.

2015-07-17 09:20:32 -0600 received badge  Famous Question (source)
2015-06-15 00:41:25 -0600 received badge  Enthusiast
2015-06-14 23:25:54 -0600 received badge  Notable Question (source)
2015-06-14 11:55:03 -0600 marked best answer rqt plugin with custom icon in Ubuntu sidebar (Unity Launcher)

Hi, is there a way to set a custom icon for a rqt plugin, that is then shown in the Ubuntu sidebar (Unity Launcher)? If you have several rqt plugins open, a custom icon would help to switch between the rqt windows.

I want basically replace the ROS icon in the image below:

image description

Thanks

2015-06-14 11:55:03 -0600 received badge  Scholar (source)
2015-06-14 11:54:59 -0600 received badge  Supporter (source)
2015-06-14 11:54:48 -0600 commented answer rqt plugin with custom icon in Ubuntu sidebar (Unity Launcher)

cool, thanks. Is it possible to do something similar for perspectives?

2015-06-14 03:19:57 -0600 commented question rqt plugin with custom icon in Ubuntu sidebar (Unity Launcher)

@130s, for the case where you have multiple plugins in the same window, it would be nice to define an icon for the perspective. Is that possible? I guess not (couldn't find something about it)

2015-06-14 03:17:34 -0600 commented question rqt plugin with custom icon in Ubuntu sidebar (Unity Launcher)

@Dirk Thomas, I invoke my own plugins usually in standalone mode.

2015-06-13 23:14:46 -0600 received badge  Popular Question (source)