Human Control of Robots

Requests regarding how to set up experiments in ARGoS.
M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Human Control of Robots

Postby M_Rizk » Thu Jul 02, 2015 6:30 am

I am currently trying to implement a program where a human operator controls a swarm via a leader. Is there any built in mechanism in ARGoS that would let me control a specific robot using keyboard/mouse input (as you would in a game) ?

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

Re: Human Control of Robots

Postby pincy » Thu Jul 02, 2015 8:45 pm

That's a nice feature request!

I have made a new release (3.0.0-beta37) and a dedicated example (manualcontrol) to show how this can be achieved. Update ARGoS to the latest version, checkout the latest version of the argos3-examples, and look at the files:
  • argos3-examples/controllers/footbot_manualcontrol/footbot_manualcontrol.h
  • argos3-examples/controllers/footbot_manualcontrol/footbot_manualcontrol.cpp
  • argos3-examples/loop_functions/manualcontrol_loop_functions/manualcontrol_qtuser_functions.h
  • argos3-examples/loop_functions/manualcontrol_loop_functions/manualcontrol_qtuser_functions.cpp
  • argos3-examples/experiments/manualcontrol.argos
Let me know if the example is clear enough.

I'll add a reference to these examples in the main website in a few days.
I made ARGoS.

M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Re: Human Control of Robots

Postby M_Rizk » Thu Jul 09, 2015 3:41 am

That was impressively fast! Thank you :)

It works great. My only comment though would be that the controls are a little different from most game controls, which means I had to play around a little before I got used to them. Specifically:

1) The down button doesn't make the footbot go backwards, it makes it turn in place.
2) If I want the footbot to say, start moving slightly rightward while it moves forward, I can't press up and right at the same time. I have to alternate between rotating and moving until I get it going the right way.

Obviously, these two things don't affect functionality, but they make controlling the robot a little less fluid. Perhaps a feature for a future release? All in all though, great update :)

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

Re: Human Control of Robots

Postby pincy » Thu Jul 09, 2015 3:52 am

Thanks for the feedback!

To add the improvements you suggest, it's just a matter of changing the way the example I wrote sets the vector. You can try and play a little with the code, if you wish. Otherwise, as soon as I have a little time, I'll make an improved version.
I made ARGoS.

M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Re: Human Control of Robots

Postby M_Rizk » Fri Jul 31, 2015 3:34 am

With regards to robot selection/deselection, is there a way to do it programmatically?

That is, right now, I have to right-click a footbot to select or deselect it, but is there a way to do so via the code?

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

Re: Human Control of Robots

Postby pincy » Fri Jul 31, 2015 4:49 am

There currently isn't a way to do it, but it seems like an easy addition. How do you want to select a robot? By id? By position?
I made ARGoS.

M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Re: Human Control of Robots

Postby M_Rizk » Fri Jul 31, 2015 5:00 am

By ID is how I was hoping to do it.

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

Re: Human Control of Robots

Postby pincy » Fri Jul 31, 2015 5:03 am

OK, I'll work on it and make a new release. It's not a hard thing to add.
I made ARGoS.

M_Rizk
Posts: 28
Joined: Thu Apr 30, 2015 2:46 am

Re: Human Control of Robots

Postby M_Rizk » Sun Sep 06, 2015 1:09 pm

Hi,

I just wanted to check if there's any news on the feature we discussed earlier (that is, programatically selecting an individual by their ID)?

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

Re: Human Control of Robots

Postby pincy » Mon Sep 07, 2015 3:18 am

Hi,

Yes, the change is in the repository, but I haven't had the time to make a new release. I'll try to do it between today and tomorrow.

Cheers,
Carlo
I made ARGoS.


Return to “How to... ?”