Coder Social home page Coder Social logo

Comments (3)

tigressine avatar tigressine commented on June 11, 2024

Yeah this is actually correct from my understanding:

In configurable simulation, you can spawn an arbitrary number of robots at once. You can configure each robot's spawn coords with spawn_?_coords. So if you wanted 3 robots, you might do this:

roslaunch ezrassor_launcher configurable_simulation.launch control_methods:=autonomy robot_count:=3 spawn_x_coords:="1 2 3" spawn_y_coords:="3 2 1"

The configurable_simulation launch file then recursively spawns all three robots. Each time, it calls the configurable_communication.launch file and also some other stuff (like the sim description). Each of these takes a single coordinate, because it is for a single robot.

So for robot 1, configurable_simulation.launch will get index [0] from spawn_x_coords, then pass it to configurable_communication.launch as spawn_x_coord. For robot 2, it'll get index [1], and so on.

Does this answer your question/concern?

from ez-rassor.

tigressine avatar tigressine commented on June 11, 2024

Here's the explanation in action: https://github.com/FlaSpaceInst/EZ-RASSOR/blob/mainline/packages/extras/ezrassor_launcher/launch/configurable_simulation.launch#L43

You can actually see all the args to configurable_communication.launch are "stepped down" from plural to singular, based on the index/robot count/robot id of the current recursive iteration of configurable_simulation.launch.

from ez-rassor.

CSharpRon avatar CSharpRon commented on June 11, 2024

Woah, first of all thank you for the research. Second of all, that is some clean use of a launch file for this functionality.
I'll close this issue since there's a valid reason for the code.

from ez-rassor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.