OHM GeneralVehicle

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,758
Reaction score
5
Points
113
Location
Cape
So attachment to a SC3 vessel is not possible ?
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
So attachment to a SC3 vessel is not possible ?
Sure, why not?

I'm just having some issues with sc3 myself, not related to general vehicle, but to my orbiter setup (which i'll fix some day). Due to this i couldn't properly testing your addon, but i gave a look at the files and i think that the rot vector you specified there should be 0 0 1, that's it
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,758
Reaction score
5
Points
113
Location
Cape
On which vehicle ?
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
In the sc3 one: you specified the rot vector as 0 0 -1, but i think it should be 0 0 1
 

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,758
Reaction score
5
Points
113
Location
Cape
I found the issue. I had to attach the SC3 vehicle to 0:1,GV_JLG_45Ebase

I didn't realize there were two attachments on the parent.

Thanks Fred !!
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
5,740
Reaction score
58
Points
123
Location
Dallas, TX
Is there a way you could isolate the needed stuff to add into an existing solution so the user could make their vehicle work great like your code does?

Like in Ummu/ucgo Dan had copy this and paste,....
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
Well, most of the addon is needed. But since there are a couple of options to exploit it even from other vessels (see the outer vessel option) why don't you just use that?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
5,740
Reaction score
58
Points
123
Location
Dallas, TX
Thanks. Sure but there are specific vehicles that have advanced steering like 360 steering (6 wheel). I will look into it.
I have not tried a vehicle with a trailer. I guess the trailer wheels turn also?
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
Thanks. Sure but there are specific vehicles that have advanced steering like 360 steering (6 wheel). I will look into it.
I have not tried a vehicle with a trailer. I guess the trailer wheels turn also?
no, the trailer is just towed around
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
5,740
Reaction score
58
Points
123
Location
Dallas, TX
I have got a question:
Always_Upright = FALSE ;if set to TRUE vehicle will always remain parallel to the ideal ground, without following terrain's inclinations

If set to TRUE the vehicle won’t
follow the terrain and will always
stay aligned with the planet’s axis


So if set to true it will not follow the hills,....
I have it set as False and the vessel is upside down in the ground?
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
So if set to true it will not follow the hills,....
I have it set as False and the vessel is upside down in the ground?
Maybe inverted coordinates for front and rear axles? just guessing
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
5,740
Reaction score
58
Points
123
Location
Dallas, TX
Well I fixed it. I raised the center of gravity so it is riding just above the surface. It was good on a landing pad but the sank halfway down the wheel other places.

The Molab has only a front axle I added some mesh parts for the rear wheels.

I guess the trailer can be a specific vessel with an attachment point. It would nice to see the trailer wheel move.



The other thing I want to try it it to make a GV vessel of a suited guy so they could walk around. I have this in 2010with Ummu but no ummu in 2016 yet

---------- Post added 08-29-17 at 05:45 AM ---------- Previous post was 08-28-17 at 07:20 PM ----------

So by Using GeneralVehicle you can kinda get UMMU.


---------- Post added at 07:28 PM ---------- Previous post was at 05:45 AM ----------

So following the mmu code in Atlantis. I want to create a GV_UMMu vessel and dock to the vessel then undock and walk away,........

Code:
	CreateDock(_V(-1.352, 2.40, -1.132), _V(0, 1, 0), _V(0, 0, -1));
Code:
void MOLAB::SeparateMMU(void)
{
	if (HATCH_proc > .8){

		// Create MMU at docking port
		DOCKHANDLE hDock = GetDockHandle(0);
		if (GetDockStatus(hDock)) return; // something is already attached to this docking port

		int i;
		char name[256];
		OBJHANDLE hVessel;
		for (i = 0;; i++) {
			sprintf(name, "%s-MMU-%d", GetName(), i + 1);
			hVessel = oapiGetVesselByName(name);
			if (!hVessel) break;
		}

		VESSELSTATUS vs;
		EVA = 1;
		GetStatus(vs);
		hMMU = oapiCreateVessel(name, "GV_UMMU", vs);
		Dock(hMMU, 0, 0, 1);
		

		oapiSetFocusObject(hMMU);
	}
}
Then the cfg for GV_UMMU:
Code:
ClassName=GeneralVehicle
Module=GeneralVehicle

Empty_Mass = 100			;[kg] empty mass (almost unused)
Mesh = ADVANCEDAPOLLO				; meshname
Cockpit_pos = 0 .456 .254	; [m m m] Position of the cockpit camera
Acceleration = 1.15			; [G] Acceleration factor expressed in Gs
Brake = 2					; [G] Deceleration factor expressed in Gs
Max_Speed = 10				; [km/h] Max Speed
Reverse_Max_Speed = 50		; [km/h] Max Speed in Reverse
Steering_Speed = .1  		; Steering wheel velocity factor
Full_Pedal_Time = 2			; [s] seconds from the beginning of pressing of Acceleration or Brake and the full power is applied
Max_Steering_Angle = 30  	; [DEG] Max steering of the front wheels per side
Height_From_Ground = 1.9	; [m] height of the center of gravity from the ground
Always_Upright = FALSE   	;if set to TRUE vehicle will always remain parallel to the ideal ground, without following terrain's inclinations
Four_Wheels_Steering = FALSE ;if true also rear wheels will steer

;Mesh Groups - just specify using space between them

;Rear_Right_Groups = 5
;Rear_Left_Groups = 6
;Front_Right_Groups = 0 3
;Front_Left_Groups = 1 4
;Middle_Axles_N = 1
;Middle_Groups_1 = 5 7 0 10


Camber = 0							;[DEG] camber angle of the front wheels, no  camber is implemented for rear wheels.

BEGIN_DOCKLIST
0 2 0   0 -1 0   0 0 1    588
END_DOCKLIST

I need to adjust the GV_UMMU DOCK. But when I undock the guy it is ok still I apply throttle it starts to spin.
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
Maybe it s just that the steering is turned
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
5,740
Reaction score
58
Points
123
Location
Dallas, TX
Not sure what you mean.
Well In space it works. But if I attach to a GV_vessel for the wheels part is where the issue is. I have adjusted the dock so it is above the surface.
When I undock the guy and start to move he spins maybe along the z axis?

So I got rid of the dock and just create a vessel.

I also increased the mass of the eva guy.

This is what I get when I create the guy.
Code:
EVAGUY:GV_UMMU
  STATUS Orbiting Moon
  RPOS 911705.615 1175612.957 893562.399
  RVEL -2.7595 -0.3875 2.1751
  AROT -97.704 -54.640 65.201
  AFCMODE 7
  IDS 0:588 10
  NAVFREQ 0 0
END
Once I switch to him and give some throttle he does good.
Code:
void MOLAB::SeparateMMU(void)
{
	if (HATCH_proc > .8){

		OBJHANDLE OBLIVIONBIKE;
		VESSELSTATUS2 vs;
		vs.version = 2;
		vs.flag = 0;
		GetStatusEx(&vs);
		VECTOR3 ofs = _V(-1.5, 1.9, -1.5);
		VECTOR3 rofs, rvel = { vs.rvel.x, vs.rvel.y, vs.rvel.z };
		VECTOR3 vel = { 0, 0, 0 };
		Local2Rel(ofs, vs.rpos);
		GlobalRot(vel, rofs);
		vs.rvel.x = rvel.x + rofs.x;
		vs.rvel.y = rvel.y + rofs.y;
		vs.rvel.z = rvel.z + rofs.z;
		vs.vrot.x = 0.00;
		vs.status = 0;




		VESSEL *OBLIVIONBIKE_vessel;
		OBLIVIONBIKE = oapiCreateVesselEx("EVAGUY", "GV_UMMU", &vs);
		OBLIVIONBIKE_vessel = oapiGetVesselInterface(OBLIVIONBIKE);
	}
}
I might need to code an eva guy so that the status is always landed?
 

emin2004

Member
Joined
Jun 26, 2017
Messages
96
Reaction score
7
Points
8
curiosity rover's body disappears can you fix it and upload it to orbithanger?
 

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
375
Reaction score
19
Points
18
Location
FRANCE
Website
francophone.dansteph.com
Bonjour Fred

I have (once again !) another question....

I understood the use of the option "Four_Wheels_Steering"

But I would like to adapt this feature for the esa truck at Kourou :
I would like that the 4 wheels of the front could turn... but in the same direction ...

I do not know if it is possible.


explanations:

The truck (it is still a prototype mesh) whith the wheels "on line"


The truck with the 4 front wheels turned: the second set of wheels does not turn in the right direction :


What I would like (photoshop editing) :



I think that is not planned, but I would like confirmation.

Thank you in advance for your answer :tiphat:
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
well I went around the code and made some tests but the fact is that the reference axis are hard-coded, and there is no way I see to do it without changing that bit of code in the dll.

I do not plan to update the module soon, because I'm deeply in something else at the moment (I'm back at coding and working on the space network).

BUT

Since it was quite easy but I don't have time to update the docs etc, I made a special version of the module that fits your purpose, so you can test it. If it works in some time I'll update the full addon.

attached you may find the updated dll (is for Orbiter 2016).

to obtain the effect you want, just add the call:
Code:
Inverse_Rear_Steering = TRUE
in the cfg file. Let me know if it works!
:cheers:
Fred
 

Attachments

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
375
Reaction score
19
Points
18
Location
FRANCE
Website
francophone.dansteph.com
Hi Fred :hello:

well I went around the code and made some tests
I do not plan to update the module soon, because I'm deeply in something else at the moment (I'm back at coding and working on the space network).
I understand... no probleme, take all time you need... :thumbup:


And thanks for your quick response ... and for the new dll for test.

It works !!!!! BUT...

I noticed a curious thing :
it works but sometimes it does not work as if "Inverse_Rear_Steering = TRUE" was not taken into account.
I have to restart the SCN one or more times, and at some point it works.

I noticed this too :
if it does not work, I move the truck forward and then I quit Orbiter.
Then I restart Orbiter with the "(Current state) .scn" and then it works.

So, I do not understand why it works sometime and why it does not work sometime again....

But I am very happy and I will be able to continue to modelize this truck ...

I give you the files so that you can test.



One more time thank you for your indispensable modules!

Jacques
 

Attachments

Last edited:

Donamy

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Oct 16, 2007
Messages
6,758
Reaction score
5
Points
113
Location
Cape
I have that problem with Orbiter 2016 all the time. If you find a solution, please let me know.:yes:
 

fred18

Addon Developer
Addon Developer
Donator
Joined
Feb 2, 2012
Messages
1,628
Reaction score
1
Points
38
What options for terminating orbiter do you have?

they are located in extra - debugging options - orbiter shutdown options

I always use "terminate orbiter process" to be sure that everything is erased in the memory. I think that also respawn orbiter should work the same way. If you have the first option active "deallocate memory and display launchpad dialog" could be the cause since as far as i know the memory is not cleaned completely with that option.

Actually to go a bit more technical, there are not any global variable in GeneralVehicle (I always make my best o never use them), so if that's the cause I don't see why it is happening anyway.

But give it a try, even if this is not the case, it could solve a lot of issues with a lot of addons.
 
Top