tavie/ros2

Description

Description not filled in by author. Very likely personal repository for testing purpose, which you should not use.

Installation Instructions

Instructions not filled in by author. Author knows what to do. Everybody else should avoid this repo.

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download Fedora 36 x86_64 (0)* Fedora 36 (0 downloads)

* Total number of packages downloaded in the last seven days.


This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/tavie/ros2/

I cannot use ros2 run command on fedora 38. I got the error below when i tried to run demo_nodes.

[erhangk@fedora ~]$ ros2 run demo_nodes_cpp talker
Failed to load entry point 'run': bad marshal data (unknown type code)
Traceback (most recent call last):
  File "/usr/lib64/ros2/bin/ros2", line 33, in <module>
    sys.exit(load_entry_point('ros2cli==0.18.7', 'console_scripts', 'ros2')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/ros2/lib/python3.11/site-packages/ros2cli/cli.py", line 50, in main
    add_subparsers_on_demand(
  File "/usr/lib64/ros2/lib/python3.11/site-packages/ros2cli/command/__init__.py", line 237, in add_subparsers_on_demand
    extension = command_extensions[name]
                ~~~~~~~~~~~~~~~~~~^^^^^^
KeyError: 'run'

Thanks for the info, i know what the issue is, i need to repackage everything to fix it. I am currently on vacation so it might be delayed until September.

okay, i fixed the issue. I also needed to restructure the packages a bit to allow for multiple ros versons. So the naming scheme from f38 onwards is ros2--.

Successfully installed ros2 on f38, thank you

How were you able to install ROS2 on fedora38? What guide did you use? Much appreciated, am a new Fedora and ROS user.

I followed the instructions from https://copr.fedorainfracloud.org/coprs/tavie/ros2/

I’m trying to launch my own package called atlas_description.

When I run ros2 launch atlas_description viewatlas.launch.py

I get the error: [ERROR] [launch]: Caught exception in launch (see debug for traceback): Caught exception when trying to load file of format [py]: No module named 'xacro'

I already have xacro installed (checked via pip).

Additionally when I try ros2 launch robots viewatlas.launch.py

I get the error: Package 'robots' not found: "package 'robots' not found, searching: ['/home/stevens/robotws/install/atlas_description', '/usr/lib64/ros2-humble']"

Any ideas as to what’s going on? I’m new to ROS2 and how COPR works, thanks.

do you have ros2-humble-xacro installed? You probably are just missing the Cmake configs i assume, those are contained in the mentioned package

Recently tried installing ROS2 and while trying to run the demos from the official website, the cpp talker works just fine, the python listener does not however.

Traceback (most recent call last):
  File "/usr/lib64/ros2-humble/lib/demo_nodes_py/listener", line 33, in <module>
    sys.exit(load_entry_point('demo-nodes-py==0.20.3', 'console_scripts', 'listener')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/ros2-humble/lib/python3.11/site-packages/demo_nodes_py/topics/listener.py", line 37, in main
    node = Listener()
           ^^^^^^^^^^
  File "/usr/lib64/ros2-humble/lib/python3.11/site-packages/demo_nodes_py/topics/listener.py", line 27, in __init__
    super().__init__('listener')
  File "/usr/lib64/ros2-humble/lib/python3.11/site-packages/rclpy/node.py", line 199, in __init__
    self._parameter_event_publisher = self.create_publisher(
                                      ^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/ros2-humble/lib/python3.11/site-packages/rclpy/node.py", line 1290, in create_publisher
    check_is_valid_msg_type(msg_type)
  File "/usr/lib64/ros2-humble/lib/python3.11/site-packages/rclpy/type_support.py", line 35, in check_is_valid_msg_type
    check_for_type_support(msg_type)
  File "/usr/lib64/ros2-humble/lib/python3.11/site-packages/rclpy/type_support.py", line 31, in check_for_type_support
    raise NoTypeSupportImportedException()
rclpy.exceptions.NoTypeSupportImportedException: no type_support imported
[ros2run]: Process exited with failure 1

Am I missing any package? Everything (according to the official website) dependency is installed.

Sorry, i was rather busy. This looks like you are missing some message package, but I am lacking context here.
I assumed you did:


ros2 run demo_nodes_cpp talker
[INFO] [1701855557.041287331] [talker]: Publishing: 'Hello World: 1'
[INFO] [1701855558.041373355] [talker]: Publishing: 'Hello World: 2'
[INFO] [1701855559.041284097] [talker]: Publishing: 'Hello World: 3'
[INFO] [1701855560.041378988] [talker]: Publishing: 'Hello World: 4'
[INFO] [1701855561.041320246] [talker]: Publishing: 'Hello World: 5'

And then listen via:

ros2 run demo_nodes_py listener
[INFO] [1701855557.054329212] [listener]: I heard: [Hello World: 1]
[INFO] [1701855558.043790308] [listener]: I heard: [Hello World: 2]
[INFO] [1701855559.041985506] [listener]: I heard: [Hello World: 3]
[INFO] [1701855560.044691506] [listener]: I heard: [Hello World: 4]
[INFO] [1701855561.043176148] [listener]: I heard: [Hello World: 5]

which works fine (on fedora 38) on my machine.

@tavie

Hey, I can’t seem to run rviz2 on using your copr repo. I am on a fresh install of fedora 39. I get a really long error message but it repeats to be:

[ERROR] [1702537471.039315555] [rviz2]: RenderingAPIException: Invalid parentWindowHandle (wrong server or screen) in GLXWindow::create at /builddir/build/BUILD/ros2-humble-rviz_ogre_vendor-11.2.9/build/rviz_ogre_vendor/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXWindow.cpp (line 257)

[ERROR] [1702537471.039335124] [rviz2]: rviz::RenderSystem: error creating render window: RenderingAPIException: Invalid parentWindowHandle (wrong server or screen) in GLXWindow::create at /builddir/build/BUILD/ros2-humble-rviz_ogre_vendor-11.2.9/build/rviz_ogre_vendor/ogre-v1.12.1-prefix/src/ogre-v1.12.1/RenderSystems/GLSupport/src/GLX/OgreGLXWindow.cpp (line 257)

[ERROR] [1702537471.039364001] [rviz2]: Unable to create the rendering window after 100 tries

I have an AMD iGPU and a dGPU on my laptop (nvidia 3060). Would that be the cause of anything?

looks like a wayland issue to me, i utilize this trick to circumvent the issue with GUI programs.

function xrun ()
{
  if [[ "$XDG_SESSION_TYPE" == "wayland" ]] ; then
    GDK_BACKEND=x10 \
      QT_QPA_PLATFORM=xcb \
      SDL_VIDEODRIVER=x11 \
      _JAVA_AWT_WM_NONREPARENTING=1 \
      WINIT_UNIX_BACKEND=x11 \
      SDL_VIDEODRIVER=wayland \
      $@
  else
    $@
  fi
}
alias rviz2="xrun rviz2"

that didn’t seem to work when i added it to my bash rc, but adding
export QT_QPA_PLATFORM=xcb
from this github thread fixed the issue. Wayland Support · Issue #847 · ros2/rviz · GitHub

Thank you for the help though, this works great on Fedora!

I have just installed ros2-humble-desktop and ros2-humble-ament packages according to tavie’s instructions. Rviz, rqt and demo_node talker & listener, turtlesim all work fine except rqt_graph. When I launch rqt_graph I get this error:

PluginManager._load_plugin() could not load plugin "rqt_graph/RosGraph": Traceback (most recent call last): File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/qt_gui/plugin_handler.py", line 102, in load self._load() File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/qt_gui/plugin_handler_direct.py", line 55, in _load self._plugin = self._plugin_provider.load(self._instance_id.plugin_id, self._context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load instance = plugin_provider.load(plugin_id, plugin_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load instance = plugin_provider.load(plugin_id, plugin_context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 66, in load self._init_node() File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 81, in _init_node self._node = rclpy.create_node(name) ^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rclpy/__init__.py", line 172, in create_node return Node( ^^^^^ File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rclpy/node.py", line 199, in __init__ self._parameter_event_publisher = self.create_publisher( ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rclpy/node.py", line 1290, in create_publisher check_is_valid_msg_type(msg_type) File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rclpy/type_support.py", line 35, in check_is_valid_msg_type check_for_type_support(msg_type) File "/usr/lib64/ros2-humble/lib/python3.12/site-packages/rclpy/type_support.py", line 31, in check_for_type_support raise NoTypeSupportImportedException() rclpy.exceptions.NoTypeSupportImportedException: no type_support imported

Does anyone know the solution?

Can you tell me the exact steps to reproduce? rqt_graph works fine on my fedora 39 system.

1- Add your copr repo
2- Install ros2-humble-desktop
3- Install ros2-humble-ament_package-0.14.0-1.fc39.noarch
4- Edit ~/.bashrc to source /usr/lib64/ros2-humble/setup.bash
5-source ~/.bashrc
6-Restart
7-Open up a terminal and type rqt_graph

Ros2-iron does not even run talker,listener etc. because of a bug in rclpy

I have located solved the problem by installing ros2-{DISTRO}-devel packages. This solves rclpy problems for both ros2-iron-desktop and ros2-humble-desktop .