Comments (2)
[...] This works by using the anchor's index as a key to a std::unordered_map inside a given Dynamics3d physics model. The map then provides the callback function with the positions and orientations that I need to send back to the space.
This looks to me like a sensible approach. If the number of elements in the map is not large, you might find that using a custom bucket-based implementation is faster. I'd go down this road only in a second moment, and if really necessary.
Perhaps it is possible to relax the requirements of / overload RegisterAnchorMethod to take a function object? At the moment this is not possible:
I designed the callback to strictly be a method of the physics model. This makes it more memory efficient and easier to write. Using a functor would be more flexible, but less efficient.
If you are really concerned about speed, you might experiment with having a single, standard callback for every anchor (callback as it is defined now), but then within the callback dispatch on the right functor defined by you. This kinda defeats the purpose of the anchors as they are designed now, but it could work.
from argos3.
Ok, I will use the std::unordered_map approach for now. Thanks for the feedback!
from argos3.
Related Issues (20)
- argos3_simulator.pc no longer generated ? HOT 8
- Compiling the e-puck plugin for argos3 59 HOT 5
- No package 'argos3_simulator' found HOT 2
- ARGoS Checkpointing
- enh/actuator-enable-disable-interface
- Issue in building the doc in installation with Eclipse HOT 1
- gl.h not found in Mac OSX 11.4 Big Sur HOT 1
- Increasing the # cameras in ARGoS HOT 5
- EmodiedEntity init is called before successful place HOT 2
- Bugs in ARGoS cmdline HOT 8
- bugfix/34/stderr-redirect
- Black screen HOT 3
- Physics of gripping with the foot-bot
- Install MacOS glut not found HOT 9
- Not using threads on WSL2 (Windows 11) HOT 2
- Bugs and usability of ARGoS drone HOT 3
- footbot_encoder can not be reading. HOT 3
- include could not find requested file: ARGoSCheckQTOpenGL HOT 1
- argos visualization error when running CPFA: cannot find CPFA_qt_user_functions on Ubuntu 22.04 LTS HOT 1
- [Fatal] Can't load library "/usr/lib/argos3/libargos3plugin_simulator_media.so"...undefined symbol HOT 1
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 argos3.