Running a VM in VirtualBox using Ubuntu 20.04. ROS2 Galactic is running ok in native mode. ros_cross_compile is installed via pip3 without any modification. Docker is also installed from the official repositories.
Expected Behavior
I tried to run this command to cross-compile for armhf one workspace
$ ros_cross_compile dev_ws/ --arch armhf --os ubuntu --rosdistro galactic
Actual Behavior
When running the ros_cross_compile tool, permissions issues arise regarding docker access to sockets
$ ros_cross_compile dev_ws/ --arch armhf --os ubuntu --rosdistro galactic
INFO:Rosdep Gatherer:Building rosdep collector image: ros_cross_compile:rosdep
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1007, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 947, in send
self.connect()
File "/home/mobuser/.local/lib/python3.8/site-packages/docker/transport/unixconn.py", line 46, in connect
sock.connect(self.unix_socket)
PermissionError: [Errno 13] Permission denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3/dist-packages/urllib3/util/retry.py", line 400, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/usr/lib/python3/dist-packages/six.py", line 702, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3/dist-packages/urllib3/connectionpool.py", line 387, in _make_request
conn.request(method, url, **httplib_request_kw)
File "/usr/lib/python3.8/http/client.py", line 1252, in request
self._send_request(method, url, body, headers, encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1298, in _send_request
self.endheaders(body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1247, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.8/http/client.py", line 1007, in _send_output
self.send(msg)
File "/usr/lib/python3.8/http/client.py", line 947, in send
self.connect()
File "/home/mobuser/.local/lib/python3.8/site-packages/docker/transport/unixconn.py", line 46, in connect
sock.connect(self.unix_socket)
urllib3.exceptions.ProtocolError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mobuser/.local/bin/ros_cross_compile", line 8, in <module>
sys.exit(main())
File "/home/mobuser/.local/lib/python3.8/site-packages/ros_cross_compile/ros_cross_compile.py", line 237, in main
cross_compile_pipeline(args, data_collector, platform)
File "/home/mobuser/.local/lib/python3.8/site-packages/ros_cross_compile/ros_cross_compile.py", line 224, in cross_compile_pipeline
stage(platform, docker_client, ros_workspace_dir, options, data_collector)
File "/home/mobuser/.local/lib/python3.8/site-packages/ros_cross_compile/dependencies.py", line 131, in __call__
gather_rosdeps(
File "/home/mobuser/.local/lib/python3.8/site-packages/ros_cross_compile/dependencies.py", line 63, in gather_rosdeps
docker_client.build_image(
File "/home/mobuser/.local/lib/python3.8/site-packages/ros_cross_compile/docker_client.py", line 64, in build_image
log_generator = docker_api.build(
File "/home/mobuser/.local/lib/python3.8/site-packages/docker/api/build.py", line 252, in build
response = self._post(
File "/home/mobuser/.local/lib/python3.8/site-packages/docker/utils/decorators.py", line 46, in inner
return f(self, *args, **kwargs)
File "/home/mobuser/.local/lib/python3.8/site-packages/docker/api/client.py", line 187, in _post
return self.post(url, **self._set_request_timeout(kwargs))
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 581, in post
return self.request('POST', url, data=data, json=json, **kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3/dist-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3/dist-packages/requests/adapters.py", line 498, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', PermissionError(13, 'Permission denied'))
To Reproduce
Simply follow the tutorial to create a simple publisher-subscriber from the official documentation and try to run the following command:
Description
Running a VM in VirtualBox using Ubuntu 20.04. ROS2 Galactic is running ok in native mode. ros_cross_compile is installed via pip3 without any modification. Docker is also installed from the official repositories.
Expected Behavior
I tried to run this command to cross-compile for armhf one workspace
$ ros_cross_compile dev_ws/ --arch armhf --os ubuntu --rosdistro galactic
Actual Behavior
When running the ros_cross_compile tool, permissions issues arise regarding docker access to sockets
To Reproduce
Simply follow the tutorial to create a simple publisher-subscriber from the official documentation and try to run the following command:
ros_cross_compile dev_ws/ --arch armhf --os ubuntu --rosdistro galactic
Note: this happens for all --arch options, not only for armhf
System
EDIT:
I tried to run the docker in Privileged mode but still no luck