Robotics StackExchange | Archived questions

Python bindings for Rviz on ROS2?

I need to use RViz in Python for ROS2 (using C++ is not an option for me). Currently there are discussions for using Shiboken to generate Python bindings. I am trying to do that, and use the library from here, but I run into the following error:

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/colcon_core/executor/__init__.py", line 91, in __call__ rc = await self.task(*args, **kwargs) File "/usr/lib/python3/dist-packages/colcon_core/task/__init__.py", line 93, in __call__ return await task_method(*args, **kwargs) File "/usr/lib/python3/dist-packages/colcon_ros/task/ament_cmake/build.py", line 59, in build rc = await extension.build( File "/usr/lib/python3/dist-packages/colcon_cmake/task/cmake/build.py", line 87, in build rc = await self._reconfigure(args, env) File "/usr/lib/python3/dist-packages/colcon_cmake/task/cmake/build.py", line 182, in _reconfigure buildfile = get_buildfile(cmake_cache) File "/usr/lib/python3/dist-packages/colcon_cmake/task/cmake/__init__.py", line 112, in get_buildfile if 'Ninja' in generator: TypeError: argument of type 'NoneType' is not iterable

Could someone help me with this? What I have learnt so far:

  1. Shiboken is needed to generate the Python bindings from C++. Does it automatically build when I run colcon build or do I need to build it separately?

  2. CMakeCache.txt is needed to get a "CMAKE_GENERATOR" param and other settings. However that isn't being written to the build directory. Could this be due to some incorrect configuration in the project CMakeLists.txt file?

Any help on how to proceed would be appreciated. Thanks!

Asked by translunarinjection on 2023-04-16 08:25:29 UTC

Comments

Answers