I got this error, but have no idea how to figure out. The code below is pretty similar to the sample solution.
Still, the problem occurs.
#include “rosbot_control/rosbot_class.h”
#include <ros/ros.h>#include
using namespace std;
class RosbotMove {
public:
RosbotMove(string turn) { this->left_or_right = turn; };
string left_or_right;
RosbotClass rosbot;
void avoid_wall();
};
void RosbotMove::avoid_wall() {while (rosbot.get_laser(0) > 1.5) {
rosbot.move();
}
if (left_or_right == “left”) {rosbot.turn("counterclockwise", 2);
} else {
rosbot.turn(“clockwise”, 2);
}
}int main(int argc, char **argv) {
ros::init(argc, argv, “Rosbot_move_node”);
RosbotMove a(“left”);
a.avoid_wall();
}
Please let me know if I have missed something here.