An example showing how to continuously read the robot state.
An example showing how to continuously read the robot state.
#include <iostream>
int main(int argc, char** argv) {
if (argc != 2) {
std::cerr << "Usage: " << argv[0] << " <robot-hostname>" << std::endl;
return -1;
}
try {
size_t count = 0;
std::cout << robot_state << std::endl;
return count++ < 100;
});
std::cout << "Done." << std::endl;
std::cout << e.what() << std::endl;
return -1;
}
return 0;
}
Maintains a network connection to the robot, provides the current robot state, gives access to the mo...
Definition robot.h:68
void read(std::function< bool(const RobotState &)> read_callback)
Starts a loop for reading the current robot state.
Contains exception definitions.
Contains the franka::Robot type.
Base class for all exceptions used by libfranka.
Definition exception.h:20
Describes the robot state.
Definition robot_state.h:34