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

How to make rqt custom plugins using ROS2 eloquent? #242

Open
JeongHyunLee7909 opened this issue Jan 15, 2021 · 1 comment
Open

How to make rqt custom plugins using ROS2 eloquent? #242

JeongHyunLee7909 opened this issue Jan 15, 2021 · 1 comment

Comments

@JeongHyunLee7909
Copy link

Hello. I'm working on making custom plugins for my robot controller GUI.

Actually, I think there are some problems working with ROS2.

In the tutorial http://wiki.ros.org/rqt/Tutorials/Create%20your%20new%20rqt%20plugin#Install_.26_Run_your_plugin ,
they use 'catkin_make' but ros2 doesn't support that build method.

So I'm trying to modify it using 'colcon build'

I succeded to add my plugin on rqt plugins tab, but if I click it, nothing shows out but a long error message at the terminal

RosPluginProvider.load(rqt_mypkg/My Plugin) exception raised in builtin.import(rqt_mypkg.my_module, [MyPlugin]):
Traceback (most recent call last):
File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_gui/ros_plugin_provider.py", line 81, in load
attributes['module_name'], fromlist=[attributes['class_from_class_type']], level=0)
ModuleNotFoundError: No module named 'rqt_mypkg'

PluginManager._load_plugin() could not load plugin "rqt_mypkg/My Plugin":
Traceback (most recent call last):
File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/plugin_handler.py", line 102, in load
self._load()
File "/opt/ros/eloquent/lib/python3.6/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 "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_gui_py/ros_py_plugin_provider.py", line 64, in load
return super(RosPyPluginProvider, self).load(plugin_id, ros_plugin_context)
File "/opt/ros/eloquent/lib/python3.6/site-packages/qt_gui/composite_plugin_provider.py", line 72, in load
instance = plugin_provider.load(plugin_id, plugin_context)
File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_gui/ros_plugin_provider.py", line 91, in load
raise e
File "/opt/ros/eloquent/lib/python3.6/site-packages/rqt_gui/ros_plugin_provider.py", line 81, in load
attributes['module_name'], fromlist=[attributes['class_from_class_type']], level=0)
ModuleNotFoundError: No module named 'rqt_mypkg'

Is there anyone who knows how to make a custom plugin using ROS2 or there is an example which I can refer to?

Thanks for your help

@HighPriest
Copy link

RQT, ROS and Gazebo all suffer from mediocre documentation.
The best thing you can do is scout through the repositories and use the latest example packages as... examples.
For making a plugin package, best place would be to look into here:
https://github.com/ros-visualization/rqt_msg/tree/foxy-devel

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