Ask Your Question
0

URDF Tutorial for ROS2 Foxy throwing an exception

asked 2021-12-24 23:36:06 -0500

iangillespie gravatar image

Hi,

Newbie here. Long time software developer, but new to ROS2. I have ROS2 Foxy installed on Ubuntu 20 running in a VM on Macbook Air M1.

I've been working through the tutorials and I'm having trouble getting started with the Building a Visual Robot Model with URDF from Scratch (http://docs.ros.org/en/foxy/Tutorials...)

I installed urdf_tutorial from github. Afterward, I was able to use colcon build to build the package and then I cd to:

~/dev_ws/src/urdf_tutorial

From there I run the command in the tutorial:

ros2 launch urdf_tutorial display.launch.py model:=urdf/01-myfirst.urdf

When I do this, I get the following:

[INFO] [launch]: All log files can be found below /home/iang/.ros/log/2021-12-25-05-28-30-907403-ubuntu-macbookair-3281
[INFO] [launch]: Default logging verbosity is set to INFO
Task exception was never retrieved
future: <Task finished name='Task-2' coro=<LaunchService._process_one_event() done, defined at /home/iang/ros2_foxy/ros2-linux/lib/python3.8/site-packages/launch/launch_service.py:226> exception=InvalidLaunchFileError('py')>
Traceback (most recent call last):
  File "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/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 "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/iang/dev_ws/install/urdf_tutorial/share/urdf_tutorial/launch/display.launch.py", line 9, in <module>
    from launch_ros.parameter_descriptions import ParameterValue
ModuleNotFoundError: No module named 'launch_ros.parameter_descriptions'

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

Traceback (most recent call last):
  File "/home/iang/ros2_foxy/ros2-linux/lib/python3.8/site-packages/launch/launch_service.py", line 228, in _process_one_event
    await self.__process_event(next_event)
  File "/home/iang/ros2_foxy/ros2-linux/lib/python3.8/site-packages/launch/launch_service.py", line 248, in __process_event
    visit_all_entities_and_collect_futures(entity, self.__context))
  File "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/lib/python3.8/site-packages/launch/action.py", line 108, in visit
    return self.execute(context)
  File "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/lib/python3.8/site-packages/launch/launch_description_source.py", line 84, in get_launch_description
    self._get_launch_description(self.__expanded_location)
  File "/home/iang/ros2_foxy/ros2-linux/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 "/home/iang/ros2_foxy/ros2-linux/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 ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-01-23 01:06:21 -0500

iangillespie gravatar image

Installed ros2-galactic on a different machine and I no longer have this issue.

edit flag offensive delete link more

Comments

Thank you for sharing the answer.

osilva gravatar image osilva  ( 2022-01-23 05:05:20 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-12-24 23:34:38 -0500

Seen: 87 times

Last updated: Jan 23