Skip to content
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

ROS_PACKAGE_PATH env variable is not set correctly after building crocoddyl with catkin build #1219

Open
aristotpap opened this issue Feb 1, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@aristotpap
Copy link

aristotpap commented Feb 1, 2024

Hello,

Thank you for developing and maintaining crocoddyl. I am facing the following problem:

I have a catkin workspace and I want to build both pinocchio and crocoddyl from source using catkin build. I have cloned their dependencies too, namely eigenpy and example-robot-data into my workspace. I can build all packages correctly except crocoddyl. When I try to build it, I don't face any errors and the process finishes as expected. However, when I try to source my workspace using source devel/setup.bash, roscd and rospack find cannot find any package built in my workspace. After building crocoddyl the ROS_PACKAGE_PATH variable is not set correctly, since echo returns /opt/ros/noetic/share, even though my workspace is sourced.

If I set the environmental variable manually, rospack finds the packages as expected.
If I build any other package in my workspace after crocoddyl, ROS_PACKAGE_PATH is set correctly for it and its dependencies, but not for crocoddyl.

One workaround to the problem, is to remove the dependencies from package.xml statements, since the error seems to be build-tree related, when crocoddyl reinstalls its dependencies. Also, I tried to find a solution online and this seems related, however I cannot tell what causes the problem.

I use ROS Noetic (Ubuntu 20.04) and catkin tools v0.9.0 with Python 3.8.10. Both crocoddyl and pinocchio are git cloned recursively. Also CMAKE_PREFIX_PATH is set as expected to /opt/ros/noetic/

@aristotpap aristotpap added the bug Something isn't working label Feb 1, 2024
@cmastalli
Copy link
Member

Hi @aristotpap,

Thanks for reporting this issue!

I have two questions for you

  1. Are you using the latest devel branch of Crocoddyl?
  2. Can you check if the ros_ws/install/.catkin files exist after compiling Crocoddyl?

Thanks,

@aristotpap
Copy link
Author

aristotpap commented Feb 1, 2024

Hi @cmastalli ,

Thank you for replying promptly.

  1. I have tried to build the master and v2.0.2 branches. They both give me the same result.

  2. I currently haven't setup an install space. I have only devel, as you can see in the following screenshot:

catkin_config

The corresponding devel/.catkin before building crocoddyl is returning: /home/akron/catkin_ws/src/eigenpy;/home/akron/catkin_ws/src/pinocchio;/home/akron/catkin_ws/src/example-robot-data

After building crocoddyl, I am not able to find the .catkin file in devel folder. It seems that it is not created. The build logs are attached.
build_logs.txt

@cmastalli
Copy link
Member

@aristotpap -- could you test the PR in #1220? This should sort out this issue.

Btw, I suggest you compile and install Crocoddyl without catkin. It is much faster and more convenient to do so.

@aristotpap
Copy link
Author

aristotpap commented Feb 5, 2024

Hello @cmastalli,

I tried to build both PR in #1220 and devel branch (since I saw that you merged it) and I was not able to build it successfully. The errors though seem unrelated. crocoddyl_build_logs.txt
These are the errors I am getting:
image

Finally, I tried to catkin build by copying the CMakeLists.txt and package.xml from your PR #1220 to master branch. It built successfully, but the problem with the ROS_PACKAGE_PATH still persists.

Note that during the weekend I was able to make it work by manually creating the .catkin file that you pointed out. But this is not a long term solution.

Thanks for the help!

@cmastalli
Copy link
Member

cmastalli commented Feb 5, 2024

Hi, @aristotpap!

The compilation error you reported is fixed in #1221. You can see more details in that PR. I'll merge this PR after passing all jobs (I hope this afternoon). However, I suggest trying this PR and reporting back.

When I compiled the latest changes, I could see the correct stored information inside ros_ws/devel/.catkin. Is it the same for you? I ask this I believe the issue with ROS_PACKAGE_PATH is there.

@aristotpap
Copy link
Author

Hello @cmastalli,

I tried building devel branch and after PR #1221 it was built successfully. However, the issue remains. Whenever I try to build crocoddyl, or state it as dependency in package.xml, the ros_ws/devel/.catkin file is not even created. If I manually create and populate it, the packages work fine.

@cmastalli
Copy link
Member

I am surprised as I couldn't replicate this issue in ROS 1. Is this happening in ROS 2?

@aristotpap
Copy link
Author

ROS 1 Noetic. It's an ANYbotics installation. I will try again with another machine and let you know. Thanks for the effort

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants