44 #include <ecl/time.hpp> 45 #include <ecl/threads.hpp> 46 #include <ecl/sigslots.hpp> 47 #include <ecl/exceptions.hpp> 48 #include <ecl/linear_algebra.hpp> 139 xbot.setBaseControl(0,0);
171 xbot.init(parameters);
200 ecl::Sleep sleep(0.1);
222 raw.c_lflag &= ~(ICANON | ECHO);
228 puts(
"Reading from keyboard");
229 puts(
"---------------------------");
230 puts(
"Forward/back arrows : linear velocity incr/decr.");
231 puts(
"Right/left arrows : angular velocity incr/decr.");
232 puts(
"Spacebar : reset linear/angular velocities.");
239 perror(
"read char failed():");
360 ecl::linear_algebra::Vector3d pose_update_rates;
361 xbot.updateOdometry(pose_update, pose_update_rates);
389 int main(
int argc,
char** argv)
393 std::cout <<
"Simple Keyop : Utility for driving xbot by keyboard." <<
std::endl;
403 std::cout <<
"current pose: [" << pose.x() <<
", " << pose.y() <<
", " << pose.heading() <<
"]" <<
std::endl;
406 std::cout << e.
what();
void incrementAngularVelocity()
If not already maxxed, increment the angular velocities..
int main(int argc, char **argv)
std::string base_port
The serial device port name [/dev/xbot].
const char * what() const
bool init()
Initialises the node.
XbotManager()
Default constructor, needs initialisation.
Parameter list and validator for the xbot.
void signalHandler(int signum)
void incrementLinearVelocity()
If not already maxxed, increment the command velocities..
void spin()
Worker thread loop; sends current velocity command at a fixed rate.
std::string sigslots_namespace
The first part of a sigslot connection namespace ["/xbot"].
void processKeyboardInput(char c)
Process individual keyboard inputs.
ecl::Pose2D< double > pose
void keyboardInputLoop()
The worker thread function that accepts input keyboard commands.
Device driver core interface.
Standard exception type, provides code location and error string.
Keyboard remote control for our robot core (mobile base).
ecl::Slot slot_stream_data
void connect(const std::string &topic)
ecl::Pose2D< double > getPose()
struct termios original_terminal_state
void decrementAngularVelocity()
If not already mined, decrement the angular velocities..
bool enable_acceleration_limiter
Enable or disable the acceleration limiter [true].
Function loading component of a callback system.
The core xbot driver class.
void decrementLinearVelocity()
If not already minned, decrement the linear velocities..