28 #include <stdr_msgs/RobotMsg.h> 29 #include <stdr_msgs/MoveRobot.h> 40 #include <nav_msgs/OccupancyGrid.h> 41 #include <nav_msgs/Odometry.h> 43 #include <stdr_msgs/RegisterRobotAction.h> 82 const stdr_msgs::RegisterRobotResultConstPtr result);
89 void mapCallback(
const nav_msgs::OccupancyGridConstPtr& msg);
98 stdr_msgs::MoveRobot::Response& res);
113 const geometry_msgs::Pose2D& newPose,
114 const geometry_msgs::Pose2D& collisionPoint);
117 const geometry_msgs::Pose2D& newPose);
172 int x1,
int y1,
int x2,
int y2) ;
geometry_msgs::Pose2D _currentPose
Holds robots previous pose.
Represents one robot in STDR. Inherts publicly from nodelet::Nodelet.
void initializeRobot(const actionlib::SimpleClientGoalState &state, const stdr_msgs::RegisterRobotResultConstPtr result)
Initializes the robot after on registering it to server.
std::vector< SensorPtr > SensorPtrVector
The main namespace for STDR Robot.
bool checkUnknownOccupancy(const geometry_msgs::Pose2D &newPose)
Checks the robot's reposition into unknown area.
ros::ServiceServer _moveRobotService
Container for robot sensors.
MotionControllerPtr _motionControllerPtr
Actionlib client for registering the robot.
bool collisionExists(const geometry_msgs::Pose2D &newPose, const geometry_msgs::Pose2D &collisionPoint)
Checks the robot collision -2b changed-.
~Robot(void)
Default destructor.
void publishTransforms(const ros::TimerEvent &)
Publishes the tf transforms every with 10Hz.
ros::Subscriber _mapSubscriber
< ROS subscriber for map
bool collisionExistsNoPath(const geometry_msgs::Pose2D &newPose)
Checks the robot collision -2b changed-.
tf::TransformBroadcaster _tfBroadcaster
Odometry Publisher.
bool _previousMovementYAxis
ros::Timer _tfTimer
ROS service server to move robot.
void mapCallback(const nav_msgs::OccupancyGridConstPtr &msg)
Callback for getting the occupancy grid map.
boost::shared_ptr< RegisterRobotClient > RegisterRobotClientPtr
bool _previousMovementXAxis
Robot's previous movement direction in Y Axis.
SensorPtrVector _sensors
The occupancy grid map.
nav_msgs::OccupancyGrid _map
ROS tf transform broadcaster.
geometry_msgs::Pose2D _previousPose
Pointer of a motion controller.
RegisterRobotClientPtr _registerClientPtr
The robot footprint in points (row * 10000 + col)
Robot(void)
Default constructor.
actionlib::SimpleActionClient< stdr_msgs::RegisterRobotAction > RegisterRobotClient
ros::Publisher _odomPublisher
Holds robots current pose.
std::vector< std::pair< int, int > > getPointsBetween(int x1, int y1, int x2, int y2)
Robot's previous movement direction in X Axis.
bool moveRobotCallback(stdr_msgs::MoveRobot::Request &req, stdr_msgs::MoveRobot::Response &res)
The callback of the re-place robot service.
std::vector< std::pair< float, float > > _footprint
void onInit(void)
Initializes the robot and gets the environment occupancy grid map.