Comments (5)
generate_dotcode
takes about 0.2 seconds at worst.qt_dotgraph.dot_to_qt.dotcode_to_qt_items()
is the real culprit, takes about 1-2 seconds.- digging deeper, in here it is
pydot.graph_from_dot_data
and subsequentlydot_parser.parse_dot_data()
consuming 95%.
- digging deeper, in here it is
Started an issue at pydotplus.
from rqt_py_trees.
Put Scene Generation into a Background Thread
- Relevant methods:
_generate_dotcode()
,_update_graph_view
,_redraw_graph_view
. - Put new messages into a queue, then signal the scene generator
- Let a scene generator be responsible for creating the 'scene' object by popping off the latest in the queue and discarding the rest
- The scene generator returns the scene via a queued connection, and the gui thread just pops this on as the current scene
- The scene generator should also be responsible for the scene cache
Optimise the Dot to Qt Code
It really really ought not to be that long. Must be some bad looping occuring.
from rqt_py_trees.
Optimising...right now there are a couple of options:
- fix pydot/pydotplus, something really wrong in their graph from dot string parsing (pydotplus#5)
- use xdot's python api, patch it into structures for rqt (perhaps check out willow's original patching of xdot for qt)
- bugger all the rqt qt_dotgraph code, just rebuild that ourselves around the xdot graph structures
- switch to a c++ version of the rqt code and use kgraphviewer's code (it is not as comprehensive as the xdot code) or loqt
from rqt_py_trees.
Preferring to go with pygraphviz. It has better documentation (also alot of other code for python graphs by networkx) so it's likely to be maintained for longer. Pydot hasn't had anything for ages and its not likely that bug will get fixed. It's also better than xdot, that would require an extensive rework and isn't as extensive an implementation as pygraphviz.
from rqt_py_trees.
First steps in lagginess resolved as described above. Note that its also moved in the entire qt_dotgraph package as a subpackage. That whole thing is relatively fubar, even though it has an abstraction for pydot and pygraphviz, it's unmaintained and doesn't work.
Python abstractions for multiple interfaces are nice, but so quickly get broken unless you have unit tests galore....I'm disliking python_qt_binding for the same reason these days too.
from rqt_py_trees.
Related Issues (11)
- Overview of the current state (June '16) HOT 4
- Broken in kinetic HOT 1
- Error when running tutorials after being installed from ROS repositories HOT 1
- Double click to show/hide a subtree
- No behavior data received HOT 2
- Add option to start with a topic selected
- Qt to Dot Package HOT 1
- Save settings into its own file
- Tree editing/construction GUI HOT 3
- Conflicting argparse arguments HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rqt_py_trees.