#include <stdio.h>
#include <string>
#include <std_msgs/Float32.h>
#include <std_msgs/String.h>
#include <std_msgs/Bool.h>
#include <Grijper/command.h>
#include <ros/ros.h>
Go to the source code of this file.
Functions | |
void | init () |
Initialiser for the system to ensure the default forces are identical throughout the system. More... | |
int | main (int argc, char **argv) |
The main method of the console. The console listens to input an passes the commands on to the controller. More... | |
Variables | |
bool | exit_cmd = false |
float | force = 0.5 |
ros::Publisher | force_ad |
void init | ( | ) |
Initialiser for the system to ensure the default forces are identical throughout the system.
Initialises the system, or in this case, passes on the given default target force for consistency ensurance.
Definition at line 86 of file console.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
The main method of the console. The console listens to input an passes the commands on to the controller.
The console listens to user input to generate a command. These commands can be 'open', 'close', 'relax', 'force < target force >', 'get_force' and 'exit' The 'open' command manually opens the gripper. The 'close' command manually closes the gripper. The 'relax' command relaxes the gripper (e.g. set the target force to 0). This can only be done manually. The 'force < target force >' command sets the target force to the '< target force >' parameter. The 'get_force' command returns the target force as has been set. The 'exit' command passes on the shutdown command to all listening nodes before shutting down itself. This should be used to control all nodes.
If an invalid command is given it will return "Please use the commands 'open', 'close', 'relax', 'force', 'get_force' or 'exit'.".'
Definition at line 31 of file console.cpp.
bool exit_cmd = false |
Variable indicating whether the shutdown command has been given.
Definition at line 12 of file console.cpp.
float force = 0.5 |
Force variable standard set to 0.5.
Definition at line 11 of file console.cpp.
ros::Publisher force_ad |
Force message publisher.
Definition at line 13 of file console.cpp.