31 : _spawnRobotClient(
"stdr_server/spawn_robot", true)
32 , _deleteRobotClient(
"stdr_server/delete_robot", true)
42 const stdr_msgs::RobotMsg msg)
45 stdr_msgs::SpawnRobotGoal goal;
46 goal.description = msg;
49 ROS_WARN(
"Could not find stdr_server/spawn_robot action.");
62 std::string msg = std::string(
"Could not spawn robot. ") +
67 ROS_INFO(
"New robot spawned successfully, with name %s.",
82 stdr_msgs::DeleteRobotGoal goal;
86 ROS_WARN(
"Could not find stdr_server/delete_robot action.");
108 const std::string& name,
const geometry_msgs::Pose2D newPose)
113 ROS_WARN(
"Could not find %s/replace ...", name.c_str());
116 stdr_msgs::MoveRobot srv;
117 srv.request.newPose = newPose;
bool waitForServer(const ros::Duration &timeout=ros::Duration(0, 0)) const
stdr_msgs::RobotIndexedMsg spawnNewRobot(const stdr_msgs::RobotMsg msg)
Spawns a new robot.
Provides a double frame id exception. Publicly inherits from std::runtime_error. Used in robot handle...
bool waitForResult(const ros::Duration &timeout=ros::Duration(0, 0))
The main namespace for STDR Robot.
bool call(const std::string &service_name, MReq &req, MRes &res)
std::string toString() const
DeleteRobotClient _deleteRobotClient
SpawnRobotClient _spawnRobotClient
< Action client for spawning robots
bool deleteRobot(const std::string &name)
Deletes a robot by frame_id.
void sendGoal(const Goal &goal, SimpleDoneCallback done_cb=SimpleDoneCallback(), SimpleActiveCallback active_cb=SimpleActiveCallback(), SimpleFeedbackCallback feedback_cb=SimpleFeedbackCallback())
Provides a connection exception. Publicly inherits from std::runtime_error. Used in robot handler...
SimpleClientGoalState getState() const
ResultConstPtr getResult() const
bool moveRobot(const std::string &name, const geometry_msgs::Pose2D newPose)
Re-places a robot by frame_id.
HandleRobot()
Default constructor.
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)