Re: Using player/stage with custom robots

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Re: Using player/stage with custom robots


thanks for helping me with my first problem.

Unfortunately, i got some more.

First, i detected that my robots can collide (when they are nearly at
the same position), even if i disabled the obstacle return. I assume
that there is no way that my robots can not collide in any way?

Second, my robots drive through the bounds of my world. The rangers do
detect the walls but the robots can drive trough, even with obstacle
return turned on. Am i able to prevent this?

At last, i want to implement several runs of the simulation in order to
evaluate my robot behavior.

My code looks as follows:

int main(int argc, char *argv[]) {

     Stg::Init(&argc, &argv);

     Stg::World world("My World");
     // Worldfile

     Logic logic(robopopsize, 0);

     for (int i = 0; i < MAX_TIME; i++) {

     return 0;

In other words, i setup the world, initialize the logic in which i
handle my robot behavior and perform several timesteps.
Immediately after the correct amount of timesteps taken, my code stops
working with a memory access error and i dont know where this comes from.

I hope you can help me once more.


>The reason the rangers do not detect robots when put on a position device
>is that they are *on top of the position device* and their beams pass over
>the other robots. To solve this, put a small negative z pose for the
>ranger, as in the pioneer and other example world files.
>On Mon, May 26, 2014 at 1:11 PM, Christof <possienke8@...> wrote:
>> Hi,
>> i am trying to implement a robot population which can detect other robots
>> via sonar/ranger devices. Unfortunately, my robot position model does not
>> work as intended.
>> This is my position model:
>> define robot position
>> (
>>     model()
>>     # actual size
>>     size [0.1 0.1 0.2]
>>     origin [0 0 0 45]
>>     bitmap "bitmaps/circle.png"
>>     # positional things
>>     drive "diff"
>>     obstacle_return 0
>>     ranger_return 1
>>     laser_return 1
>>     # sensors attached to robot
>>     laser_sensor()
>> )
>> and my robots look like this:
>> robot
>> (
>>     name "r0"
>>     pose [ 6 6 0 151]
>>     color "blue"
>>     ranger_return 1
>> )
>> Without the model() line the rangers do not work correctly. They only
>> detect walls, not the other robots besides the ranger_return 1.
>> With the model() line the rangers work correctly. But somehow, the robots
>> have not the intended sizes, colors, and shapes.
>> I attached screenshots to show my problem and the world file. I use
>> stage.hh to setup my world and control the robots.
>> Does anyone know how to fix this problem? If there is more knowledge
>> needed to fix this problem please ask me.
>> Greetings,
>> Christof
>> ------------------------------------------------------------------------------
>> The best possible search technologies are now affordable for all companies.
>> Download your FREE open source Enterprise Search Engine today!
>> Our experts will assist you in its installation for $59/mo, no commitment.
>> Test it for FREE on our Cloud platform anytime!
>> _______________________________________________
>> Playerstage-developers mailing list
>> Playerstage-developers@...

HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions
Find What Matters Most in Your Big Data with HPCC Systems
Open Source. Fast. Scalable. Simple. Ideal for Dirty Data.
Leverages Graph Analysis for Fast Processing & Easy Data Exploration
Playerstage-developers mailing list
[hidden email]