0
$\begingroup$

Rosanswers logo

I'm new to ROS and rviz.

I want to write a new tool rviz plugin like the one in this tutorial (adding a new tool on the tool bar), but in python rather than C++. My plugin tool needs to be able to create a line by dragging the mouse across the display in rviz. (I'm just practicing to write a simple tool here.)

I couldn't find any helpful resources or documentations on writing rviz plugin in python, nor a plugin written in python that I can reference on. Does anyone know any tutorial or resources or a sample plugin that might help?

Thanks!


Originally posted by ms0719584 on ROS Answers with karma: 11 on 2016-06-27

Post score: 1


Original comments

Comment by gvdhoorn on 2016-06-27:
Afaik, it's not possible to write RViz plugins in Python (or at least, not without instantiating a Python interpreter in your C++ plugin class and then using that to run Python (but even that would need bindings of some sort)). Let's hope someone responds to your question that proves me wrong.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

There is an old Tutorial on how to do it the other way around. Using import librviz Python bindings to get Rviz`s 3D visualizer and adding your functionality. The tutorial displays a grid of variable line width.


Originally posted by user23fj239 with karma: 748 on 2016-08-16

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.