how to add and control multiple robots in simulation ??? RRS feed

  • Question

  • hello 

    i want to create multiple robot in an environment using the ExplorerSim Project in ProMRDS, this project simulate a Pioneer robot, i want to add another robot and control them together in the same environment. I looked in the manifest file, how can i modify this file to add another robot????

    thanks for help.


    Tuesday, December 2, 2014 11:01 AM

All replies

  • hi,our QQ group is  299417418,welcom
    Thursday, December 4, 2014 8:20 AM
  • Hi, Oumay.

    The robot entity is created in MazeSimulator service, and its creation is hardcoded there. The simplest way to add a robot is to modify MazeSimulator's code. These ProMrds things lack any resemblance to good architecture. You could use them for a quick start, but in a little bit longer run you would have to refactor them.

    Monday, December 8, 2014 11:01 AM
  • thank you for help,
    i modify the MazeSimulator's code in order to add another robot, so i have two robots in the simulation environment. But when i run the ExplorerSim there is only one robot that can navigate and the other is not in move.
    So, how can modify the ExplorerSim's code in order to let the two robots navigate.

    thanks for help.
    Wednesday, December 10, 2014 3:30 PM
  • You should master the concept of manifests. ProMRDS book could help you better than me in this endeavour. And dssme tool will help you even further.

    Manifests describe services to be created and their configuration. Also services could be created from partner attributes in code. Hence, service controlling your first robot is created either one or antoher way. Find that place.

    Services controlling simulation entities are special: they have a convention concerning what entity they administer. You need another instance of such service for your second robot to be able to control it. Start it (probably via code duplication).

    If the partner attribute does not allow you to configure everything you want, than you could always use Policy.UsePartnerListEntry and configure it via manifest.

    And the last, you will need to start the second ExploreSim service and bind it to your new controlling service, so that it could manipulate the second robot.

    That's a strategy, the tactics is all yours:)

    And if you wish to add some more robots (e.g. N), everything will become even more interesting.

    • Edited by Matvei S Thursday, December 11, 2014 2:17 PM
    Thursday, December 11, 2014 2:16 PM
  • hello,
    thank you for your response 
    can you explain more this idea please because i don't understand
    i looked in the ProMRDS book but i don't find how can i add multiple autonomous robots from a behavior service using the Partnership by using C#.

    thank you for help.
    Friday, January 9, 2015 10:10 PM
  • Hi again, Oumay,

    You will not find there how "to add multiple autonomous robots...". You could find there what it's all about. What the service, contract, partnership, attributes, etc are. The Part I is must read.

    I've looked into MazeSimulator code. The services are created directly from code.

    As far as you need only two robots I would do the next:

    0. Add second robot (it has to have the name different from the first one) - Done.

    1. Remove code that starts services from MazeSimulator

    2. Replicate the same service structure in manifest using dssme (services from CreateMotorBase, CreateLaserRangeFinder, CreateBumperArray, CreateCamera) twice, dssme will give different names to services of the same type. Don't forget entity partners.

    3. Add there two ExplorerSim services, drag and drop corresponding different partners to slots. You might need to change PartnerCreationPolicy to UsePartnerListEntry in ExplorerSim, or you might not, I am not sure.

    If you need more robots you have to resort to creation of services from code. The creation part is already implemented in MazeSimulator. And you will have to learn how to find services in directory by name. I don't know how to do it, but it's definetly possible. It's the very same thing that manifest loader performs.

    • Edited by Matvei S Wednesday, January 14, 2015 6:41 AM
    Sunday, January 11, 2015 8:16 PM