Open rjcausarano opened 2 years ago
This was proposed in PR#66 but was postponed for a future PR
Retrieve docks with:
const std::string robot_name = model->GetName(); const std::vector<std::string> docks_names = RetrieveDocksNames(world_);
Where RetrieveDocksNames should be hosted in gazebo_ros_helpers:
std::vector<std::string> RetrieveDocksNames(const gazebo::WorldPtr & world) { std::vector<std::string> docks_names; for(const gazebo::ModelPtr& model : world->Models()) { const std::string model_name = model->GetName(); // If model_name ends with "_dock" docks_names.push_back(model_name); } return docks_names; }
Hi, Is spawning multiple robots supported?
@moutalibbadr not yet, however there's a draft PR in progress: https://github.com/iRobotEducation/create3_sim/pull/176
This was proposed in PR#66 but was postponed for a future PR
Retrieve docks with:
Where RetrieveDocksNames should be hosted in gazebo_ros_helpers:
std::vector<std::string> RetrieveDocksNames(const gazebo::WorldPtr & world) { std::vector<std::string> docks_names; for(const gazebo::ModelPtr& model : world->Models()) { const std::string model_name = model->GetName(); // If model_name ends with "_dock" docks_names.push_back(model_name); } return docks_names; }