From: Bernhard W. <be...@bl...> - 2012-11-24 15:40:20
|
Hi James > I've been running Torcs-1.3.3 and have had a couple problems. First, > when running my bot at a faster speed than real-time, my bot will > sometimes float straight up, then off to the side of the track and the > race will end. (This issue seems like a bug, but I'm reluctant to say so > since I've modified the TORCS code.) Second, I am having trouble with I guess this must have something to do with your changes, I have never seen/heard of a problem like this before. The problem "makes no sense" if you look at how TORCS works: It simulates basically in simulation time, just when you have a "watching mode" selected it synchronizes real and simulation time to spit out frames, that is it. So I doubt that there can be something wrong. I hope you do not rely on the real time clock in your robot, only use the simulation time. > I have tried to copy/paste this into my drive() fuction (from other > drivers code) but all I see is the gear bouncing between 1st and 2nd > gear, so I feel I must be missing something. I didn't understand what > the code was doing so I tried a bunch of variations with _gear and > _gearCmd and and even tried manipulating the clutch. Is there any > documentation on how gear changing is supposed to work? No, but it is trivial, the gearbox switches to the gear you choose. How you do the decision is then your business;-) But one example is explained in the robot tutorial: http://www.berniw.org/torcs/robot/ch3/gears.html This method just works if the gearbox ratios differ and have the correct order, so if you sabotage the gearbox you can make this method fail, but for any halfway "real" gearbox it works. > I have tried upgrading to TORCS-1.3.4 to see if my issue with the bot > leaving the course would be fixed, but it crashes once I select a track > when configuring the race. (It seems to be crashing sometime after the > constructor is called for my bot, but before any other function in that > class.) Is there anything I need to know to move my bot to the newer > version? Maybe, have a loot at this, this is the only adoption regarding drivers in 1.3.4, all the other bots are unchanged (if I remember correct): http://torcs.cvs.sourceforge.net/viewvc/torcs/torcs/torcs/src/drivers/human/human.cpp?r1=1.45.2.9&r2=1.45.2.10&pathrev=r1-3-1 If you took bt/beriw/etc. robots as base it should work then I guess. I recommend just comparing what you do with the existing robots or running the debugger, then you will see. > I'd also like to note that none of the links in the FAQ seem to be > working right now. I recognized that some days ago, but I did not yet have time to look into this, I upgraded the CMS recently, and it could be the result of a cross site scripting fix which has done there, but I have to look into this. Best regards Bernhard |