Sending Real values over the range and bearing actuator

Requests regarding how to set up experiments in ARGoS.
Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Sending Real values over the range and bearing actuator

Postby Elendurwen » Thu Nov 28, 2013 8:38 pm

I want to send a number of Real values over the range and bearing actuator in Argos3. A Real (double) can be encoded into 8-element long array of UInt8, which is the type the range and bearing actuator needs. The actuator is set up so that it sends 1 packet of 10-element UInt8 array at a time step, meaning you can only send 1 double at a time.

Now, one way around sending multiple Real values is to just send them in different type steps. However, I was wondering if you could just resize the packet to support more doubles at the same time? I tried just using SetData(array) with an array of size 20 but Argos threw an error.

Thanks!

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Sending Real values over the range and bearing actuator

Postby pincy » Fri Nov 29, 2013 10:23 am

Hi Elendurwen,

For the time being, the implementation of the foot-bot range-and-bearing system is kept close to its real counterpart. On the real robot you can only send 10 bytes per step, so that's why it is so in the simulator.

However, I see why one might want to have a larger message payload in simulation.

I think that a good compromise is to add a parameter to the foot-bot that allows the user to set the number of bytes to send. In this way, one could try out different configurations.

What do you think?

I could make the change next week and prepare a new release.

Cheers,
Carlo
I made ARGoS.

Elendurwen
Posts: 41
Joined: Sat Aug 24, 2013 5:08 pm
Contact:

Re: Sending Real values over the range and bearing actuator

Postby Elendurwen » Fri Nov 29, 2013 1:42 pm

Hi Carlo,

I think you are right - if that's how it is on a real robot then that's how it needs to be in simulation. No worries - I have an implementation now that keeps tracks of what variables have been sent and received and the receiver doesn't do anything until it receives the whole message. Just thought I would ask the question in case I missed something more elegant that was possible to do.

Thanks for the offer anyways - still might be a useful addition for someone else perhaps?

Best,
Lenka

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Sending Real values over the range and bearing actuator

Postby pincy » Fri Nov 29, 2013 2:20 pm

Hi Lenka,

I'll put this as a TODO for a moment in which I have time then :-)

Cheers,
Carlo
I made ARGoS.


Return to “How to... ?”