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

Small fixes #37

Merged
merged 3 commits into from
Nov 6, 2024
Merged

Small fixes #37

merged 3 commits into from
Nov 6, 2024

Conversation

goldarte
Copy link

@goldarte goldarte commented Oct 18, 2024

Add small fixes for running workbench:

  • Auto detect user id in dockerfile
  • Add check if rclpy was already inited
  • chmod +x for run.bash

In my case, I have user id 1001, so can't do anything with created files from container. Also I get an error at Freecad startup in Report View:

18:38:21  During initialization the error "Context.init() must only be called once" occurred in freecad.cross
18:38:21  --------------------------------------------------------------------------------
18:38:21  Traceback (most recent call last):
  File "<string>", line 226, in InitApplications
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/goldarte/.local/share/FreeCAD/Mod/freecad.robotcad/freecad/cross/__init__.py", line 9, in <module>
    from .wb_globals import g_ros_distro
  File "/usr/lib/python3/dist-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
    return original_import(name, *args, **kwargs)
  File "/home/goldarte/.local/share/FreeCAD/Mod/freecad.robotcad/freecad/cross/wb_globals.py", line 24, in <module>
    g_ros_node, g_ros_executor = get_node_and_executor()
  File "/home/goldarte/.local/share/FreeCAD/Mod/freecad.robotcad/freecad/cross/ros/node.py", line 30, in get_node_and_executor
    rclpy.init()
  File "/opt/ros/iron/lib/python3.10/site-packages/rclpy/__init__.py", line 89, in init
    return context.init(args, domain_id=domain_id)
  File "/opt/ros/iron/lib/python3.10/site-packages/rclpy/context.py", line 70, in init
    raise RuntimeError('Context.init() must only be called once')
RuntimeError: Context.init() must only be called once

@drfenixion
Copy link
Owner

drfenixion commented Oct 18, 2024

Thank you for contribution. I will process PRs after big feature pack i am working on.

@drfenixion drfenixion merged commit 42e33f3 into drfenixion:main Nov 6, 2024
@drfenixion
Copy link
Owner

Thank you. Merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants