Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How to setup a Car in ODE? #331238
07/02/10 20:34
07/02/10 20:34
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
HI,
Maybe someone can help me on how to setup a car correctly?(simple one, BOX as car, and simple wheels).

Iam stuck at setting up the wheels correctly(params1/params2)

I thought ic ould learn it by taking a look into "Knights on wheels" but this codee is just one big dschungel and no comments.

So maybe someone could help me or do an example?

Greets
Rackscha


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: How to setup a Car in ODE? [Re: Rackscha] #331246
07/02/10 21:24
07/02/10 21:24
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
In one of the AUM i think it was between 60-70, there is a code, well documented, from George. Take a look into this laugh


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: How to setup a Car in ODE? [Re: alibaba] #331250
07/02/10 21:37
07/02/10 21:37
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
ok, thanks
i'll search for it^^


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: How to setup a Car in ODE? [Re: Rackscha] #331252
07/02/10 21:41
07/02/10 21:41
Joined: May 2009
Posts: 445
Peine, Germany
Razoron Offline
Senior Member
Razoron  Offline
Senior Member

Joined: May 2009
Posts: 445
Peine, Germany
samples/carlevel.c

Re: How to setup a Car in ODE? [Re: Razoron] #331259
07/02/10 22:01
07/02/10 22:01
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
@razoron
thanks will try this

AUM only uses a template :| (AUM 85)

EDIT:

nope didnt help. cant find the reason for THIS problem:



EDIT2: Ah XD just used the wrong axis grin

Last edited by Rackscha; 07/02/10 22:40.

MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: How to setup a Car in ODE? [Re: Rackscha] #331317
07/03/10 11:53
07/03/10 11:53
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Okay,
car itself seems to work.
Now iam stuck at the steering.
Wheels(front wheels) turn left/right according to key input, no problems.

But sometimes they dont turn smoothly, they flip over.

This is my code:

Code:
function control_car()
{
	float max_angle = 0;
	float stear_control = 0;
	while(1)
	{
		stear_control = (key_d-key_a);
		max_angle += stear_control*20*time_step;
		max_angle = clamp(max_angle,-30,30);
		if(stear_control != 0)
		{
		phcon_setparams2(my.con_a,vector(max_angle,max_angle,0),nullvector,nullvector);	
		phcon_setparams2(my.con_b,vector(max_angle,max_angle,0),nullvector,nullvector);	
		}else{
		max_angle = max_angle*(1-0.5*time_step);
		if(abs(max_angle) < 1)
		{
			max_angle = 0;
		}	
		phcon_setparams2(my.con_a,vector(max_angle,max_angle,0),nullvector,nullvector);	
		phcon_setparams2(my.con_b,vector(max_angle,max_angle,0),nullvector,nullvector);	
		}
		temp.x = (key_w-key_s)*1000;
		phcon_setmotor(my.con_a,nullvector,vector(-temp.x,100,0),nullvector);
		phcon_setmotor(my.con_b,nullvector,vector(-temp.x,100,0),nullvector);
		phcon_setmotor(my.con_c,nullvector,vector(-temp.x,100,0),nullvector);
		phcon_setmotor(my.con_d,nullvector,vector(-temp.x,100,0),nullvector);	
		wait(1);
	}	
}



con_a is front_Left wheel
con_b fron right
con_c back left wheel
con_d back right wheel

MAybe someone can help me to get the steering working correct?


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: How to setup a Car in ODE? [Re: Rackscha] #332065
07/07/10 14:28
07/07/10 14:28
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline OP
Serious User
Rackscha  Offline OP
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
Still no idea frown ?

I know that this error doesnt occur in knightsonwheels, but the code of knightsonwheels is just a heavy mess. not readable for me.


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: How to setup a Car in ODE? [Re: Rackscha] #332066
07/07/10 14:34
07/07/10 14:34
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
take a look at the car template


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: How to setup a Car in ODE? [Re: painkiller] #338943
08/22/10 21:54
08/22/10 21:54
Joined: Nov 2008
Posts: 354
saeculum II
MPQ Offline
Senior Member
MPQ  Offline
Senior Member

Joined: Nov 2008
Posts: 354
saeculum II
look into this thread, there you will find help:

Thread


new project in early stage...

Intel Xeon X3450 2,66GHz | Mushkin 8 Gib | Zotac GTS250 + 7300LE | A8.3 com

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1