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

OSError: [Errno 8] Exec format error: '/home/car/ros2_ws/install/rf2o_laser_odometry/lib/rf2o_laser_odometry/rf2o_laser_odometry_node' #35

Open
feelj opened this issue Feb 22, 2023 · 1 comment

Comments

@feelj
Copy link

feelj commented Feb 22, 2023

I'm going to do ros2 with ydlidar x2.
I was going to install slam_toolbox to map it, but I couldn't, so I was advised to install rf2o_laser_odometry. I followed your advice,

ros2 launch ydlidar_ros2_driver ydlidar_launch.py
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 base_link laser_frame
ros2 launch rf2o_laser_odometry rf2o_laser_odometry.launch.py laser_scan_topic:=scan
ros2 launch slam_toolbox online_async_launch.py `base_frame:=base_link`

but there was an error.
[ERROR] [rf2o_laser_odometry_node-1]: exception occurred while executing process:
Traceback (most recent call last):
File "/opt/ros/humble/lib/python3.10/site-packages/launch/actions/execute_local.py", line 546, in __execute_process
transport, self._subprocess_protocol = await async_execute_process(
File "/opt/ros/humble/lib/python3.10/site-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 139, in async_execute_process
transport, protocol = await _async_execute_process_nopty(
File "/opt/ros/humble/lib/python3.10/site-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 45, in _async_execute_process_nopty
transport, protocol = await loop.subprocess_exec(
File "/usr/lib/python3.10/asyncio/base_events.py", line 1667, in subprocess_exec
transport = await self._make_subprocess_transport(
File "/usr/lib/python3.10/asyncio/unix_events.py", line 207, in _make_subprocess_transport
transp = _UnixSubprocessTransport(self, protocol, args, shell,
File "/usr/lib/python3.10/asyncio/base_subprocess.py", line 36, in init
self._start(args=args, shell=shell, stdin=stdin, stdout=stdout,
File "/usr/lib/python3.10/asyncio/unix_events.py", line 799, in _start
self._proc = subprocess.Popen(
File "/usr/lib/python3.10/subprocess.py", line 969, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1733, in _execute_child
self._posix_spawn(args, executable, env, restore_signals,
File "/usr/lib/python3.10/subprocess.py", line 1678, in _posix_spawn
self.pid = os.posix_spawn(executable, args, env, **kwargs)
OSError: [Errno 8] Exec format error: '/home/car/ros2_ws/install/rf2o_laser_odometry/lib/rf2o_laser_odometry/rf2o_laser_odometry_node'

Help me plz...

@pep248
Copy link

pep248 commented May 6, 2024

Found the solution!
For me it was adding:
#!/usr/bin/env python3
at the top of the executable file

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

No branches or pull requests

2 participants