sbarthelemy / arboris-python Goto Github PK
View Code? Open in Web Editor NEWA rigid body dynamics and contacts simulator written in python.
Home Page: http://chronos.isir.upmc.fr/~barthelemy/arboris
License: Other
A rigid body dynamics and contacts simulator written in python.
Home Page: http://chronos.isir.upmc.fr/~barthelemy/arboris
License: Other
joints with limits are modelled by an instance of joints.LinearConfigurationSpaceJoint (for the parametrization and the integration) and an instance of constraints.JointLimits (for the limits...).
These two class may be merged, to make the implementation simpler.
pro:
con:
Currently the visu is hard to extend because :
states are positions and (sometimes) velocities. Velocities are already grouped in World._gvel and thus easy to manipulate, but positions are scattered through the joints.
We should probably provide a better way to handle them. It would be useful when saving trajectories too.
In some case, several joints are couple (Nao's hip is an example), it is probably possible to support this situation.
this would be useful for creating reduce the complexity of some models (creating a planar model for instance).
An alternative solution would be to make the locked joints stateless as stated in #9
When a box and a point are in contact, the normal computation fails. The math should be changed.
http://groups.google.com/group/arboris-devel/browse_thread/thread/5ba807045059be89
There several small cleanups that could be done but would break compatibility.
Better to discuss them here and perform all of them at the same time.
World.iterbodies
to World.bodies
World.getbodies
(doing NamedObjectsList(World.bodies)
) is easy enoughrobots/simpleshapes.py
. They are only used for tests and not flexible enough for other usesrst
to txt
setup.py imports a cython module, which fails if cython is not available.
As the number of options grow, the keyboard shortcuts one has to remind grows too. Having a menu system in the browser would help circumvent this problem.
displaying a grid would be useful to:
However this would add more parameters to tune:
and in many cases a shapes.Box
would still be needed for collisions with the ground, and would hide the grid.
a grid with adjustable spacing would be useful to improve space perception of the ground
Here is an example of WorldObserver that tries to pickle world at each simulation timestep
#import cPickle as pickle
import pickle
class WorldPickler(WorldObserver):
def __init__(self, world, file):
self._file = open(file, 'wb')
self._dumps = []
self._world = world
def init(self):
pass
def update(self, dt):
world = self._world
self._dumps.append(cPickle.dumps(world, protocol=-1))
def finish(self):
pickle.dump(self._dumps, self._file, protocol=-1)
However, it fails with this error:
pickle.PicklingError: Can't pickle <type 'instancemethod'>: it's not found as __builtin__.instancemethod
Currently, gravity is handled as an additional force, in a dedicated controller. It could be computed more efficiently as an acceleration offset, acting on a FreeJointWithGravity joint.
currently, a user can mess everything when setting a world state.
For instance joint.gvel[0] = 2.
is ok, but joint.gvel = 2.
is not, as it breaks the link between joint.gvel
and world.gvel
. The same problem occurs with joint.gpos
.
maybe joint.gvel
should be removed completely, as it is redundant with world.gvel
. Currently, joint.gvel
is used...
joint.integrate()
, but it could be passed as an argument to integrate.world.gvel[joint.dof] = ...
joint.twist
, which is itself called in Body.update_dynamic()
. It's less easy to remove it from there.Note also that we do not povide a joint.gforce
interface, which could be useful and seem logical as long as there is joint.gvel
.
The JointsList
class is an attemps to provide a nicer interface. It currently provides
joints.dof
(a 1d array or a slice)joints.gvel
(a 1d array wich is a copy of the selected joints gvels)joints.gpos
(a 1d array wich is a copy of the selected joints gpos if they are 1d)maybe the gvel
and gpos
should be dropped, or moved in another class (such as a per-robot one: human36, ...)).
For reference, KDL has a different approach: they have a single joint class that handles all the (1dof) joints, and which does not store the joint state at all.
Currently the GS algorithm stops after 20 iterations, this may be not enough or too much, we should change that.
Joints are used to
For example, for RzJoint only allows rotations around z-axis. To specify the z-axis position relatively to the bodies, SubFrames are needed in most cases.
We could remove this need be replacing RzJoint with H0RzJoint or RzH0Joint, where H0 is a constant transform.
Doing so would have advantages:
and some disadvantages...
Presently, the add_{robot} function anchor the robot at "world.ground".
We should add a parameter "frame" where the first joint will be anchored. "frame" would default to "world.ground"
this would mean adding an 'up' vector to the world
human36 module is a mess that should be cleaned.
using named tuples (from the collections module) might help
The code structure allow support for non-hlonomic joints such as wheel on a plane, however, no joint of this king is implemented yet.
We could
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.