ctu-mrs / mrs_apptainer

Apptainer wrappers, definitions, scripts and resources for the MRS UAV System.
http://github.com/ctu-mrs/mrs_uav_system
28 stars 15 forks source link

Compiling in user_ros_workspace, linkage issue to /opt/mrs/mrs_workspace #1

Closed aaraujo11 closed 2 years ago

aaraujo11 commented 2 years ago

Im trying to compile the ctu-mrs/example_ros_packages, in user_ros_workspace folder, however when i catkin build it, there are errors related that it couldn't find the mrs packages such as _mrsmsgs among others, i try to source it in several ways to export the /opt/mrs/mrs_workspace without success, i check the .bashrc file and it seems to be calling and sourcing all correct paths.

[MRS Singularity] andre@dell:~/user_ros_workspace$ catkin config --extend /opt/mrs/mrs_workspace
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/catkin_tools/verbs/catkin_config/cli.py", line 142, in main
    context = Context.load(
  File "/usr/lib/python3/dist-packages/catkin_tools/context.py", line 260, in load
    ctx.load_env()
  File "/usr/lib/python3/dist-packages/catkin_tools/context.py", line 455, in load_env
    extended_env = get_resultspace_environment(self.extend_path, quiet=False)
  File "/usr/lib/python3/dist-packages/catkin_tools/resultspace.py", line 83, in get_resultspace_environment
    raise IOError(
OSError: Cannot load environment from resultspace "/opt/mrs/mrs_workspace" because it does not appear to be a catkin-generated resultspace (missing .catkin marker file).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/catkin", line 33, in <module>
    sys.exit(load_entry_point('catkin-tools==0.8.2', 'console_scripts', 'catkin')())
  File "/usr/lib/python3/dist-packages/catkin_tools/commands/catkin.py", line 266, in main
    catkin_main(sysargs)
  File "/usr/lib/python3/dist-packages/catkin_tools/commands/catkin.py", line 261, in catkin_main
    sys.exit(args.main(args) or 0)
  File "/usr/lib/python3/dist-packages/catkin_tools/verbs/catkin_config/cli.py", line 165, in main
    print('error: could not configure catkin workspace: %s' % exc.message)
AttributeError: 'OSError' object has no attribute 'message'
[MRS Singularity] andre@dell:~/user_ros_workspace$  source /opt/mrs/mrs_workspace/devel/setup.bash
bash: /opt/mrs/mrs_workspace/devel/setup.bash: No such file or directory
klaxalk commented 2 years ago

Hey, you can not just extend the /opt/mrs/mrs_workspace. You either have to extend the devel or the install space in a workspace.

The MRS Singularity now contains just the install space. However, you should not need to extend it manually (you can if you want, that would be catkin config --extend /opt/mrs/mrs_workspace/install). Just call catkin init within the user_ros_workspace, which should automatically extend the right path. Did you follow the readme? Let me know if we should update the readme.

Selection_169

Tomas

aaraujo11 commented 2 years ago

Hello @klaxalk, i delete the previous .sif and start from zero, and it works fine this time, i was able to install all the packages i need octomap_mapping_planning among others, and its running smoothly, thank you!