Jump to content


  • Content Count

  • Joined

  • Last visited

Everything posted by Charrua

  1. congrats it is just two motorized hinges? or some vehicle feature? haven't had time to play with leadwerks new features...
  2. Charrua

    Shoot Simulator

    Yes, that's the point. And, here, money do not reach aceptable levels. I mean, yes third world but not the worst country mine, but our army has few resources and this kind of equipment is a must at first training stages. I and my friend did the development with our money, now waiting for burocracy to get some bucks
  3. Charrua

    Shoot Simulator

    Well, finally, a job done! This is the press note of the military news youtube channel: On July 26, the "Comandos" day here in my country (Uruguay, I know no one knows what or where it is, so from where I am, but is fine was te official inauguration of a Shoot Simulator I been working on. (Attached a cut, with the part in which the simulator appear, simply a flash ) I made it with the Professional Edition of Leadwerks as a standalone app. on Ubuntu 16.04 The systems uses some not traditional Game/Software hardware, made by me and a couple of people like me, who works in the metalurgical industry. We receive real guns, insert on them sensors and actuators to simulate the real behavior of them. An infrared laser on it, is detected by a couple of special cameras wichs only sees the ir dots of the guns, then with some math, I translate the IR camera coords space to Leadwerks 3D world projected and seen for us. Turn on a laser of one gun, read the coord seen by the cameras (if any) and repeat for each gun is made by a main microcontroller that is in comunication with the microcontrollers on each camera. The main micronontroller also reads the gun´s sensors to know when a shoot is done and if it is ok to simulate a shoot or not, based on it the gun was reloaded etc.. State changes and camera coordinates are transimted to de PC and Leadwerks do the rest Attached some pictures, some commented, with relevant and not so relevant things Juan simuladorDeTiro.mp4
  4. Hi Alien, I'm also somewhat lost.. going back, nice to hear about you.
  5. Yes, so excited to see it almost finished. Guess next month will be installed and working... And perhaps I'll see some money
  6. Not yet, but, if the project continues, it should be a next step or something to take into consideration. A 360 degrees detection system should be possible, but, more complex and expensive
  7. He he, me too! This video is of a couple of years when we build the demonstration prototype. test4.mp4
  8. It's more hardware than software, leadwerks part is to have something to shoot :). Guns have infrared lasers, a camera system detects where the gun is in the screen, then with some maths to translate corrds to leadwerks, a camera pick, and that's it. Simply put. Electronics simulate the gun behavior, and as you will see, I'm not an expert RECORTAR_20190410_105041.mp4 RECORTAR_20190410_104628.mp4
  9. drives were mounted but as ro, did a mount -o remount rw / then nano .xsessionrc delete the "shutdown..." line and voila... all is working again thank you very much
  10. well, now I have another problem, my bad i placed a shutdown line after gedit, to test if the systems shotsdown after gedit, and found that the system start and shutdown (no gedit) is there a way of intercept startup and open a terminal so I can delete the .xsession file? thanks
  11. well, if i place a .xsessionrc file with: then ubuntu starts, exec gedit and gedit open the pj01.sh file located in the above directory but if, instead of gedit i place ./pj01.sh then LE app do not start
  12. Thanks, I'll try it as soon as I get home.
  13. the thing now is how or from where I execute this script, because if i launch it from .config/autostart it start the leadwerks app, but do not shutdown the system my idea was that turning on the PC the app autostart and when quitting it, the system shutdown Is there other way to autostart an app?
  14. Ah, ok! yes, now, it shutdown if i run it from a terminal not if I use the .desktop shortcut this is the pj01.sh now
  15. thanks, but nope if i open a terminal and execute the pj01.sh script, the leadwerks app starts ok, and after it, simply the terminal again last line of leadwerks throws : AL lib: (EE) alc_cleanup: 1 device not closed then, the propmt. (and, no other command on the script seems to be executed)
  16. i placed a "ls" instead a shotdown, but nothing is executed after the leadwerks app
  17. thanks for answer i have this file in .config/autostart also works with: and the pj01.sh is: i write the line after exec, but after pj01 ends, system do not shoot down if I open a terminal, shutdown -h now, works ok i try other combinations but, due to my lack of knowledge on the subject... i somewhat lost and with the !bin/bash Juan
  18. Hi, it's been a long time from my last post here I'm finishing a Leadwerks program on ubuntu 16.04, not a game, is a 3d graphical interface for a "Shoot simulator" with real (modified) guns. I'm so novice with linux, so after some reading i got the application run at startup. This application is the only one which will run on this pc, so it should start at startup and the system should shootdown when quitting from the application. (after try and pray many times... ) Basically i end placing a .desktop file in .config\autostart directory with a exec command to the leadwerks script to run the project file, so simple once one get to know how I guess that, i can place a shootdown command on the launch script, but I did not find the way, all my readings point to: shootdown -h now (edit: i mean.. shutdown not shootdown) but, i guess i'm not doing, writting, placing it in the correct way. Some linux expert here? Thank's in advance Juan
  19. i do like the way the cars behave at low speed with leadwerks physics, but, as speed rises it shakes so much, so for omega i was using something like: self.entity:SetOmega(omega.x/(1+2*currentSpeed/maxSpeed),omega.y/(1+currentSpeed/maxSpeed),omega.z/(1+2*currentSpeed/maxSpeed)) this way, i use the omega practically unaltered at low speed and then as speed rises and goes near maxSpeed, the x,y,z components are modulated playing with the 1+2* or 1+1* or 1+5* i get more or less attenuation on desired axes. I do not play with your car, stiil, I will for sure, in the video it looks and behaves very well, but so much rigid at low speed (for me ) the x5 is still in my mind.. will try, thank´s for sharing all this stuff
  20. self.Tires[n]:SetOmega(self.Tires[n]:GetOmega()*Vec3(5,5,5)) --------- make the car go faster very smart! --Smoothing: if turning==0 then self.entity:SetOmega(self.entity:GetOmega()*Vec3(-1,-1,-1)) else self.entity:SetOmega(0,turning*Gas,0) end self.Axes[0]:SetOmega(self.Axes[0]:GetOmega()*Vec3(-1,-1,-1)) self.Axes[1]:SetOmega(self.Axes[1]:GetOmega()*Vec3(-1,-1,-1)) self.Axes[2]:SetOmega(self.Axes[2]:GetOmega()*Vec3(-1,-1,-1)) self.Axes[3]:SetOmega(self.Axes[3]:GetOmega()*Vec3(-1,-1,-1)) self.Axes[0]:SetVelocity(self.Axes[0]:GetVelocity()*Vec3(1,0.5,1)) self.Axes[1]:SetVelocity(self.Axes[1]:GetVelocity()*Vec3(1,0.5,1)) self.Axes[2]:SetVelocity(self.Axes[2]:GetVelocity()*Vec3(1,0.5,1)) self.Axes[3]:SetVelocity(self.Axes[3]:GetVelocity()*Vec3(1,0.5,1)) -- fake wheels update: self.Wheels[0]:SetMatrix(self.Tires[0]:GetMatrix()) self.Wheels[1]:SetMatrix(self.Tires[1]:GetMatrix()) self.Wheels[2]:SetMatrix(self.Tires[2]:GetMatrix()) self.Wheels[3]:SetMatrix(self.Tires[3]:GetMatrix()) self.Wheels[0]:SetPosition(self.PosWheels[0]+Vec3(0,self.Amortisseurs[0]:GetAngle()/6,0)) self.Wheels[1]:SetPosition(self.PosWheels[1]+Vec3(0,self.Amortisseurs[1]:GetAngle()/6,0)) self.Wheels[2]:SetPosition(self.PosWheels[2]+Vec3(0,self.Amortisseurs[2]:GetAngle()/6,0)) self.Wheels[3]:SetPosition(self.PosWheels[3]+Vec3(0,self.Amortisseurs[3]:GetAngle()/6,0)) end too much tuning on all of this constants... very nice!
  21. Charrua

    Simple Car Improved

    Sphere is placed by math at the center of the 4 wheels, so, as you say, any shape is ok. The camera uses the orientation of the real chassis, for that reason it has this strange behavior. I still use a 100 mass car, an strength is scaled as speed rise. The chassis hits the ground and has 0 friction, I guess is better to hide it and let the fake chassis look nice and slow, perhaps I reduce the movement using some average values to reflect or simulate a more realistic one...
  22. Charrua

    Simple Car Improved

    About krazy tests... video captures are so glitchy, i guess is the combination of leadwerks and the video capture sofware.. There are 4 lines of text, the first two are what is the speed aplied to the wheels and so, the estimates speed, based on diameter*PI in m/s and km/s The last two lines are based on real distance travelled (taking chassis positions each second and calclating distance, with vec3 distance to point function) I placed the chassis underground and it behaves ok, but beaware of not jump! The white sphere (is a fake chassis) is placed by hand doing an average of the position of the 4 wheels. testCar body under floor seen.avi if you set the property Hidden on the editor, then jumps are ok but, behavior is not much as realistic as it should, when you stop, the chassis seems to do a pendulus movement.. testCar body under floor hiden.mp4 now, the following two test are with the cassis in the correct place, seen/not seen. When chassis is correctly placed, as marcosuik says it tends to touch the floor and seems to try to fly I am using strength scaled (increased) by car speed. testCar body avobe seen.avi testCar body avobe hidden.avi Juan
  • Create New...