[SOLVED] How to get a new robot up and running?

Use this forum to report bugs or ask for help

Moderator: kilo

[SOLVED] How to get a new robot up and running?

Postby RockinRhythm » Thu Apr 17, 2014 8:14 pm

I am developing a robot for academic purposes, but I am struggling already with the basics. I am using SD 2.1 beta version, and basically what I did so far was - I created a folder for my robot (called "ascari") /src/drivers/ascari (with the basic code structure), and copied the usr_sc folder in data/drivers and renamed everything inside it to match the name of my robot. I am pretty sure I handled adjustments of CMakeLists.txt files correctly, as the log of commands "cmake ..; make; make install" didn't produce anything suspicious.

At first, no driver instance was listed for my robot. I tried messing around, renaming files and variabled back and forth, and after a while, I've finally got one instance correctly listed. So I took it on a track in practice mode and it seemed like it's behaving as I've coded it (I've implemented the very first code snippet from berniw's tutorial, just basic steering at first gear). But strangely, after messing around with the values in code, the robot was acting still in the same way, no matter what changes I've done to the code (and yeah, i did re-"make install" it). Strangely, after the robot crashed, it recovered on it's own, which is something that I have not implemented at all! I figured out the instance is taking its behaviour from some other robot, but definitely not my implementation...

So i tried renaming variables and files some more to achieve the "linkage" between my robot implemented in /src/drivers/ascari folder and instances defined in /data/drivers/ascari folder, but for the past three hours I've failed to even get an instance listed again! I am getting really desperate, so my question is... am I missing something here? Does there need to be some more work done aside from defining a robot in source tree and listing instances in /data/drivers folder? And how to link those two correctly? Thank you.
Last edited by RockinRhythm on Sat Apr 19, 2014 1:41 pm, edited 1 time in total.
RockinRhythm
 
Posts: 5
Joined: Mon Feb 24, 2014 7:58 pm

Re: How to get a new robot up and running?

Postby chad3006 » Thu Apr 17, 2014 8:35 pm

Here's a link to an old TORCS robot tutorial. http://www.berniw.org/tutorials/robot/

And here's another link http://sourceforge.net/apps/trac/speed-dreams/wiki/RobotCodeMagic

I don't know anything about the robot coding myself.
User avatar
chad3006
 
Posts: 230
Joined: Mon Aug 13, 2012 7:56 pm
Location: USA

Re: How to get a new robot up and running?

Postby mungewell » Fri Apr 18, 2014 3:47 pm

If you believe that your code is building correctly, you should check that at shared library for the robot is produced and installed appropriately. Review the messages in the console as the game starts to see if there is any mention.

In terms of getting a driver listed, you could check out this patch:
http://sourceforge.net/apps/trac/speed-dreams/changeset/3982

Which was the stuff required to add a new robot & driver for the USR robot to drive rally. It might give you a hint of something you missed.

Good luck,
Simon.
mungewell
 
Posts: 307
Joined: Fri May 20, 2011 4:05 pm
Location: Southen Alberta, Canada

Re: How to get a new robot up and running?

Postby RockinRhythm » Fri Apr 18, 2014 7:03 pm

mungewell wrote:If you believe that your code is building correctly, you should check that at shared library for the robot is produced and installed appropriately. Review the messages in the console as the game starts to see if there is any mention.

In terms of getting a driver listed, you could check out this patch:
http://sourceforge.net/apps/trac/speed-dreams/changeset/3982

Which was the stuff required to add a new robot & driver for the USR robot to drive rally. It might give you a hint of something you missed.

Good luck,
Simon.

As it turns out, if I take usr implementation (and rename it) it works OK, but if I take wdbee's basic FrameworkRobot structure (simpledriver.cpp, simpledriver.h and its dependencies), I indeed get an error at the game start, specifically:

Code: Select all
00:00:00.263 Default  Error   linuxModInfoDir: ...  /usr/local/lib64/games/speed-dreams-2/drivers/bottas/bottas.so: undefined symbol: _ZTI15TAbstractDriver

*sigh*
RockinRhythm
 
Posts: 5
Joined: Mon Feb 24, 2014 7:58 pm

Re: How to get a new robot up and running?

Postby RockinRhythm » Sat Apr 19, 2014 1:41 pm

Alright, I managed to get it going after so much struggle, so consider this problem fixed.
RockinRhythm
 
Posts: 5
Joined: Mon Feb 24, 2014 7:58 pm


Return to Problems, Fixes & Help

Who is online

Users browsing this forum: Bing [Bot] and 3 guests

cron