-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flexbe_states: create symlink to behavior and state sources in installed package path #56
base: feature/flexbe_app
Are you sure you want to change the base?
Conversation
… FlexBE App can find the Python sources
@@ -25,6 +25,14 @@ catkin_package( | |||
#install(PROGRAMS bin/hello | |||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) | |||
|
|||
install(CODE " | |||
file(MAKE_DIRECTORY \"$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CATKIN_PACKAGE_SHARE_DESTINATION}/src\") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Respecting the DESTDIR
environment variable is required for Debian-packaging (https://www.gnu.org/prep/standards/html_node/DESTDIR.html).
Thank you for looking into this! I will check what to do best from the flexbe_app side to handle the case of installed packages. |
PR for flexbe_app now also submitted: |
Thank you Dorian! I actually started an implementation of this in parallel
last weekend. I will merge the two versions next weekend and then test
everything together.
… |
As suggested in the original PR, the following features have been added:
@meyerj and @DorianScholz can you check flexbe_app@feature/install_support whether this addresses your requirements appropriately before I close this PR? |
Sorry, I am not using FlexBe at the moment and have no time to test the branch. I assume that you or @DorianScholz actually tested the approach, but I fear that catkin's special behavior to "link" Python packages to the devel-space using $ python -c 'import imp; print(imp.find_module("my_python_pkg")[1])
/path/to/devel/lib/python2.7/dist-packages/my_python_pkg instead of
AFAIK there is no built-in way of finding back the actual source folder of a Python package from devel-space. What might work is to:
|
We still cannot launch a behavior from install-space using the approach described at Running Behaviors Without Operator without this patch. I assume the Probably that is what has been fixed by @DorianScholz in the patches referenced in #56 (comment)? In general I agree that patching |
@pschillinger What is the status of this issue in the ROS 1 at this point in time? Did this get resolved by other means? |
I had to add this cmake snippet to the
flexbe_states
package and also to all our custom state and behavior packages to fix an error message in the FlexBE App when running from install-space:Another alternative is to always install an additional copy of the
src
folder to the package dir (${CATKIN_PACKAGE_SHARE_DESTINATION}
), independent of the files installed tolib/
.A better approach would be to patch the FlexBE App such that it can find the source code using python:
or relative to the package path:
But I don't know enough about JavaScript and the underlying mechanics to propose such a patch. The relevant code seems to be in src/io/io_packageparser.js.
It does not make sense to modify behaviors in an install-space or if the sources are not writable by the current user, e.g. because they are owned by root. But I assume the FlexBE App would still need to find the sources in order to only run a behavior. It would be a nice-to-have that the respective controls ("Statemachine Editor", "Save Behavior", ...) are disabled in those cases.