ipa-kut / ipa-kut/ros_marvelmind_package

cannot launch under ros2 foxy

Open
#4 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
1
Forks
4
PR merge metrics
No merged PRs in 30d

Description

## Environment
- OS: Ubuntu 20.04.04 LTS
- ROS version: ROS2 Foxy

## Error Message
```
[INFO] [launch]: All log files can be found below /home/electop/.ros/log/2021-10-23-07-51-49-750505-NT950-131680
[INFO] [launch]: Default logging verbosity is set to INFO
Task exception was never retrieved
future: exception=InvalidLaunchFileError('py')>
Traceback (most recent call last):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 53, in get_launch_description_from_any_launch_file
return loader(launch_file_path)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 62, in get_launch_description_from_python_launch_file
launch_file_module = load_python_launch_file_as_module(python_launch_file_path)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/python_launch_file_utilities.py", line 37, in load_python_launch_file_as_module
loader.exec_module(mod)
File "", line 848, in exec_module
File "", line 219, in _call_with_frames_removed
File "/home/electop/robot_ws/install/marvelmind_nav/share/marvelmind_nav/launch/marvel_driver_launch.py", line 14, in
from launch_ros import get_default_launch_description
ImportError: cannot import name 'get_default_launch_description' from 'launch_ros' (/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/__init__.py)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
await self.__process_event(next_event)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
visit_all_entities_and_collect_futures(entity, self.__context))
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 45, in visit_all_entities_and_collect_futures
futures_to_return += visit_all_entities_and_collect_futures(sub_entity, context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/utilities/visit_all_entities_and_collect_futures_impl.py", line 38, in visit_all_entities_and_collect_futures
sub_entities = entity.visit(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/action.py", line 108, in visit
return self.execute(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/actions/include_launch_description.py", line 125, in execute
launch_description = self.__launch_description_source.get_launch_description(context)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
self._get_launch_description(self.__expanded_location)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_description_source.py", line 53, in _get_launch_description
return get_launch_description_from_any_launch_file(location)
File "/opt/ros/foxy/lib/python3.8/site-packages/launch/launch_description_sources/any_launch_file_utilities.py", line 56, in get_launch_description_from_any_launch_file
raise InvalidLaunchFileError(extension, likely_errors=exceptions)
launch.invalid_launch_file_error.InvalidLaunchFileError: Caught exception when trying to load file of format [py]: cannot import name 'get_default_launch_description' from 'launch_ros' (/opt/ros/foxy/lib/python3.8/site-packages/launch_ros/__init__.py)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with launch/marvel_driver_launch.py, especially the import at line 14 shown in the traceback, and reproduce the launch attempt in the reported Ubuntu 20.04 and ROS2 Foxy environment. Check how this launch file is loaded under Foxy and verify the package launches without the reported ImportError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
robotics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.