Closed remi2257 closed 4 years ago
First, could you add a screenshot of the false warnings and what sort of files were scanned incorrectly? It could help find the problem. The only duplication inspections I currently have are about .msg files, since only 0.1.5 starts dealing with package.xml files so I suspect this may be a PyCharm thing. Like I asked on issue #3, what would you want to see in a tutorial/wiki? At the moment the project setup is supposed to be completely automatic, though it can be manually configured from the settings page (under languages & frameworks in the settings menu).
Hey,
I do not want to rerun the inspect, it took way to long, but basically, as it runs from "~/" path, it will soon or later run into my project and re-inspect it.
Currently, I have none automatic configuration at all. Moreover, as it runs from USER_HOMEPATH, it won't find ROS folder because it's installed in /opt/ros/melodic/_
This issue will be fixed with my second point, do not worry about it :smile:
Like I asked on issue #3, what would you want to see in a tutorial/wiki? At the moment the project setup is supposed to be completely automatic, though it can be manually configured from the settings page (under languages & frameworks in the settings menu).
Ok, that a first good point, I did not know that :bulb:
You should mentioned that on your PyCharm documentation. Information are lost among the history Version, while it could be so simple to just mentioned it.
Like :
ROS Support Plugin come up with 3 path values: 1) ROS Path : it is filled automatically with $ROS_ROOT value. This could be done by adding the line _export ROSROOT=/opt/ros/melodic to your .bashrc file 2) Workspace path : ... 3) Additionnal package path (optinional) : ....
I think I got the first one, but I do not understand what should be write on workspace path field ?
Cheers
First, thanks for pointing out what information you would like to see. This can help me know what I need to put in the wiki.
You should mentioned that on your PyCharm documentation. Information are lost among the history Version, while it could be so simple to just mentioned it.
The documentation from the changelogs will be copied to the wiki. Any specific details you are intrested in?
I think I got the first one, but I do not understand what should be write on workspace path field ?
I will write this in the wiki, but this is the concept behind all 3 (and soon more) options in the dialog:
/opt/ros/<version>
but people have different settings, thus, the directory could be installed elsewhere..catkin_workspace
.Currently, I have none automatic configuration at all.
Here are potential reasons why the settings variables were not set for you:
$ROS_ROOT
. The two are not the same: ROS Path is the grandparent of the ROS root, which points to the cmake of the core ros package. this value is set in .bashrc
with the command source /opt/ros/<version>/setup.bash
. Do you run this command in your .bashrc before loading PyCharm? without it, the IDE cannot know where anything ROS is located.$ADDITIONAL_PACKAGE_PATH
. This is completely optional since the introduction of catkin, so it can be left empty.I do not want to rerun the inspect, it took way to long, but basically, as it runs from "~/" path, it will soon or later run into my project and re-inspect it.
As a general suggestion, consider making your root project the catkin_ws directory since all of your work would be there, and the things the packages within catkin_ws depends on would be added to the "External Libraries" tab in the project view. This will make all inspections and PyCharm in general run conderably faster.
Thank you for your answer, you detailed well and I think it will be a very good start for your Wiki :smile:
I'm starting to have a good handle of ROS on PyCharm !
I have another question but I do not want to create a new issue because it might fit also on the Wiki -> Different imports work well for .py files, but PyCharm still doesn't like things like :
from my_pckg_msgs.srv import ObjDetection
I got the same problem with messages even if the version history mentionned :
added support for *.srv files
So, is it supposed to work, and if so, how can I make it works :) ? (To answer your first question, Yes, it is working with a rosrun command :yum: )
Cheers and thanks again !
This issue usually happens when the IDE is not set up using the commandline. This page discusses how to set up PyCharm for ROS, which is general setup that is required for now with or without the plugin. However, from what you posted here it seems you already did that, so I am not sure. The plugin has a long way to go before it can support messages/services in python/c++ files but it is definatly planned. At the moment, it only highlights the files, adds inspections, and adds autocompletion to them (with references to other .msg files).
Cheers!
EDIT: according to that page I linked this happens because you didn't mark the service/message files as sources. This would probably solve the issue.
Hey,
Just to let you know that this trick didn't work for referencing srv & msg files, but that's not a big deal.
Do not hesitate to notify me if new updates come :smile:
Thank you once again, pleasure to work with you
Rémi
Hi,
I'm trying to use your plugin to add rospy to my work environment but it's kinda hard to figure out what to do with it ^^ It's basically the same issue as #3
When I add it to PyCharm, it leads to an inspection of my home directory, which is not where my ROS package is located, and which also leads to "every line of your code is duplicated from another source" because, my repo is basically scans 2 times.
I think that I have to add some paths in .xml files from the .idea folder but I do not know which field I should fill ... :stuck_out_tongue:
Can you help on that ? Maybe, you could do a tutorial ?
Cheers