ros-industrial / ros_qtc_plugin

ROS Qt Creator Plug-in (https://ros-qtc-plugin.readthedocs.io)
398 stars 214 forks source link

Issues with update to 4.9.2 #370

Closed pathare535 closed 3 years ago

pathare535 commented 5 years ago

After updating to 4.9.2, I started to receive an error that the ROS installation could no be found. specifically the error seen in the messages pane is "[ROS ERROR] ROS does not appear to be installed." A secondary issue I noticed at this time was qt no longer parsing my xml files. I solved this issue first by modifying the default directory where the qt looks for the highlight definitions. Screenshot from 2019-07-09 08-02-20 after updating the definitions location I had to navigate to the folder and find xml.xml and in the extensions field highlighted in the screen shot below added .launch, .xacro, and .urdf. Screenshot from 2019-07-09 08-48-43

The ROS Error was caused by the wrong file path under the ROS tab in tools > options > ROS. the file path should be as shown in the screen shot below. Screenshot from 2019-07-09 09-20-48

once this is fixed reboot qtc and try and build.

danneboom commented 5 years ago

I got the same xml parse problems after updating (thanks for the quick fix). Using ROS kinetic, I get a slightly different ROS Error on startup:

[ROS Error] Unable to find ROS distributions.

and the same bunch of warnings. This error is NOT fixed by setting the file path in tools-options-ROS, but does not cause any further trouble (build works fine).

Levi-Armstrong commented 5 years ago

@pathare535 I just update the installer so let me know if you still have issues with updating.

danneboom commented 5 years ago

I've just tried it, unfortunately it didn't change something for me

But anyways, with the xml.xml changes from pathare535 everything works.

mbuijs commented 5 years ago

I have just tried 0.3.9 and it still has the issue. I have briefly used 0.3.8 for a few days (in which it did not work) and before that 0.3.5, where the highlighting worked fine for .urdf, .xacro and .launch files.

christian-rauch commented 3 years ago

There are two issues here:

1) The syntax highlighter does not parse launch, xarco and urdf files. This makes sense since the ROS plugin does not install syntax highlighting for those file types. By manually changing generic-highlighter, you change the highlighting files that are provided with Qt Creator. I don't think a plugin should mess with the default highlighter files, since this will just override the generic highlighting file by the last plugin that accesses it. Instead, the ROS plugin should either provides its own highlighting files for those file types (https://github.com/ros-industrial/ros_qtc_plugin/pull/416) or find a way to register launch, xacro and urdf file types as XML files.

2) The plugin does not parse the ROS installation. There is not enough information in the issue report to see what is happening. It would be good to know where the ROS plugins searched instead. You may have switched the ROS distributions without changing this in the project settings. The ROS plugin is not able to detect this automatically.

The first issue is known. To solve this we have to provide our own syntax files or register the target fie types as XML. The second issue seems to be a one-off case that did not appear again since this. I am going to close this issue for now. If this happens again, just reopen this and provide some more details about the setup and if ROS installations changed etc.