Re: ODE - AMotor and Ball Joint

188 views
Skip to first unread message

Dimitris Papavasiliou

unread,
Apr 25, 2013, 5:48:11 AM4/25/13
to ode-...@googlegroups.com

I read the manual ODE, but I could not understand how ball joint && Amotor warking;
please someone
explain me how I use this join in detail ( degree of freedom, setting  Angular motor's parameter, setting Amotor's axis and mode.....)
regards

What do you want to do with it?  The amotor can be used in many ways and for many purposes.
 

Bill Sellers

unread,
Apr 29, 2013, 8:49:25 AM4/29/13
to ode-...@googlegroups.com
As I guess most people know, developing on MacOS is drifting away from using the GNU toolchain to using clang. Currently that's not an issue since gcc is included and you can easily cross link to ODE compiled with gcc. However I thought I'd see how easy it was to compile ODE with clang on a mac in case that isn't an option in the future. Anyway I'm glad to report that it is all very straightforward. If you run configure like this with ode-0.12 then everything will compile:

./configure --enable-double-precision --with-trimesh=opcode --enable-libccd CXX=clang++ CC=clang --with-drawstuff=none

Note that I couldn't get drawstuff to compile like this but to be honest I didn't try very hard. In my application it all seems to work although I don't do complex collisions (ray-trimesh is as far as I go)

Cheers
Bill

Danny Price

unread,
Apr 29, 2013, 9:07:24 AM4/29/13
to ode-...@googlegroups.com
Good news!

I recently ported a commercial OSX application from GCC 4.0 to LLVM and was quite impressed by it. The only thing you have to be careful about is the libstdc++ vs libc++ issue.

Have you tried out the static analyser yet?

Drawstuff on OSX just uses GLUT now so I don't see any reason why it wouldn't work.
> --
> You received this message because you are subscribed to the Google Groups "ode-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ode-users+...@googlegroups.com.
> To post to this group, send email to ode-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/ode-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Bill Sellers

unread,
Apr 29, 2013, 9:29:52 AM4/29/13
to ode-...@googlegroups.com
It could easily be my setup - I've just tried this on my work computer and it even compiled drawstuff OK.

./configure --enable-double-precision --with-trimesh=opcode --enable-libccd CXX=clang++ CC=clang

clang seems much quicker than gcc but it does throw out a couple of warning messages. Neither seem important. One is in Ice (part of OPCODE) but I don't think _prefetch is ever used (and I'm not sure it is particularly useful either).

../../OPCODE/Ice/IceUtils.h:226:51: warning: expression result unused; assign into a variable to force a volatile load [-Wunused-volatile-lvalue]
inline_ void _prefetch(void const* ptr) { (void)*(char const volatile *)ptr; }
^~~~~~~~~~~~~~~~~~~~~~~~~~~

The other is in a utility function that I imagine gets no use outside debugging.

include/ode/misc.h:58:70: warning: conversion from string literal to 'char *' is deprecated
[-Wdeprecated-writable-strings]
ODE_API void dPrintMatrix (const dReal *A, int n, int m, char *fmt = "%10.4f ",
^
This probably just needs a 'const' in the prototype.

These may have already been fixed in the svn repository and I can't see either causing any trouble.

Cheers
Bill

TIBER Ahmed

unread,
May 8, 2013, 6:02:16 PM5/8/13
to ode-...@googlegroups.com
to make robot , & virtuak creature and i wanna undrstand how do work this joint,

Joseph Cooper

unread,
May 8, 2013, 8:44:35 PM5/8/13
to ode-...@googlegroups.com
The ball joint keeps some point on each rigid body together, but does nothing else.  The AMotor controls the relative angular velocity of the two bodies.  To use the AMotor to control the relative orientation of two bodies that are connected by a Ball joint, you have two different modes. dAMotorEuler and dAMotorUser.  If you set the AMotor to use Euler mode, then you need to give two axes.  One axis is relative to the first body the other is relative to the second body.  The amount of rotation occurring around those respective axes can be limited with the proper dParamLoStop, dParamHiStop.  The angular velocity around those axes can be controlled with dParamVel and dParamFMax.  The joint also computes a third axis (which is called the second axis) by taking the cross-product of the other two.  You can control rotation around this axis as well.  This mode works pretty well as long as none of your angles get very big.  There's an explicit singularity around one axis, but the others don't like to be too big either.

In user mode, you need to specify each axis independently, and the HiStop/LoStop parameters don't do anything.  Withi this joint, you can servo directly to some relative orientation between two bodies and do some cool things, but it requires more book-keeping and code on your part. 

If you can describe what you want the joints to actually accomplish, perhaps we can give more tips.

jc


--
Reply all
Reply to author
Forward
0 new messages