ipa320 / rqt_frame_editor_plugin

An rqt plugin for creating, manipulating and managing tf frames.
MIT License
21 stars 11 forks source link

Segmentation Fault at execution #12

Closed mescarra closed 6 years ago

mescarra commented 6 years ago

Hello,

When I try to run this plugin along with a ROS app I have developed, I get the following error as soon as I execute rqt:

Thread 1 "Th" received signal SIGSEGV, Segmentation fault.
0x000000000096a7a4 in std_msgs::Header_<std::allocator<void> >::Header_ (
this=0x7fffffc6c0) at /opt/ros/kinetic/include/std_msgs/Header.h:22
22 struct Header_

If I do the same with a clean roscore running (no topics, no nodes) it works fine.

My app has some static tf publishers along with a a few c++ nodes.

I have no clue regarding what is going on here. Any ideas?

ipa-lth commented 6 years ago

Hi, hard to tell you something useful... Does it only happen when you start the plugin within rqt or does it directly crash with rqt alone? Could you try to start rqt "fresh" and see if the same stuff happens ('rqt --clear-config' [beware this removes your default perspective and plugin settings]). If not see if you can load the plugin then? Also maybe the frameeditor standalone? (rosrun rqt_gui rqt_gui --standalone frame_editor)

We had some issues with the conflicting service names, but it seems not to be the issue here.

Let me know if you find something.

If possible you may give me a minimal example setup that I can try to recreate the problem here.

Thx Lorenz

mescarra commented 6 years ago

The crash occurs as soon as I open the plugin. If I open a clear rqt nothing happens until I add the plugin. If I open it standalone, I get it right away.

I will try to reproduce it with a minimal setup.

mescarra commented 6 years ago

Ok, it was an error on my end. I was subscribing to the tf topic and indexing the first entry of the TFMessagePtr transforms vector. When I open frame_editor plugin, it starts broadcasting empty transforms so that's why the segfault.

BTW, It would be very useful to me if I could modify existing static transforms. ¿Is there any way I could do that?

ipa-lth commented 6 years ago

Ah ok, so I delete my wild guesses :-).

Unfortunately, you can only manipulate frames within the frameeditor. I should be fairly easy to recreate your static tf frames within the frameeditor, then kill the static transform publishers and use the frameeditor (with arg to load your file and/or headless) in the future instead (have a look here: https://github.com/ipa320/rqt_frame_editor_plugin/blob/kinetic-devel/frame_editor/launch/frame_editor.launch).

The workflow to recreate the tf frames would be something like:

mescarra commented 6 years ago

Thanks!

I'm launching the frames along with the main launchfile headlessly on one machine, and running rqt_gui with all my plugins (including the frame editor) on another machine (connecting to the roscore through the network). And it works great!

I have one more question, though. When you have multiple plugins loaded on rqt_gui, the frame_editor takes over the top bar and the rqt_gui top bar is not usable any more. I would like to add the frame_editor plugin and then save the perspective, but I can't do it :( Are you aware of this issue? or am I doing something wrong? (again)

ipa-lth commented 6 years ago

I am really not aware of this. I'm on vacation next week, but I will try to look into this issue afterwarts. I usually use the frameeditor in a tap within rqt. I never recognized the top bar issue...

mescarra commented 6 years ago

Hi! Were you able to reproduce the top-bar issue?

ipa-lth commented 6 years ago

Not really. The "top-bar" seems ok? See my screenshot: image image

(No I this is not my actual rqt perspective :-D)

mescarra commented 6 years ago

I'm not seeing the top bar on the screenshot. The way I reproduce it is the following. Open an rqt gui without frame-editor. Go to the top bar. You should see "File", "Plugins", "Running", "Perspectives", "Help". These menues constitute rqt top bar. It looks like this: before

Then I add frame-editor plugin and I get the following: after

which seems like frame-editor options. In fact, if I go to "File->Save", it will save a frame-editor yaml file and not the rqt perspective.

mescarra commented 6 years ago

Ok, I didn't want to mess around with the code but I could solve it by commenting out these lines in FrameEditorGUI.ui:

<item>
    <widget class="QMenuBar" name="menuBar"/>
</item>

and also every menuBar appearence in project_plugin.py.

Looking good now.

ipa-lth commented 6 years ago

Thanks for your help! Please make a PR and I will have a look at it soon.