/* * This file is part of OpenKC * * Copyright(c) Matthias Schöpfer (mschoepf@techfak.uni-bielefeld.de) * http://opensource.cit-ec.de/projects/openkc * * This file may be licensed under the terms of of the * GNU Lesser General Public License Version 3 (the ``LGPL''), * or (at your option) any later version. * * Software distributed under the License is distributed * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either * express or implied. See the LGPL for the specific language * governing rights and limitations. * * You should have received a copy of the LGPL along with this * program. If not, go to http://www.gnu.org/licenses/lgpl.html * or write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * The development of this software was supported by the * Excellence Cluster EXC 277 Cognitive Interaction Technology. * The Excellence Cluster EXC 277 is a grant of the Deutsche * Forschungsgemeinschaft (DFG) in the context of the German * Excellence Initiative. * */ #ifndef _FRI_OKC_COMM_H_ #define _FRI_OKC_COMM_H_ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "fri_okc_types.h" #include "fri_okc_helper.h" #ifdef __cplusplus extern "C" { #endif #define OKC_BUFFER_SIZE 8192 #define OKC_ARBITRARY_STRING_LENGTH 256 #define OKC_QUIT 0xff #define OKC_POSITION_CONTROL 0x11 #define OKC_AXIS_CONTROL 0x22 #define OKC_MIN_FD 3 okc_handle_t* okc_start_server (const char* host,const char* port, int mode); int okc_register_axis_set_absolute_callback (okc_handle_t* okc, int robot_id, okc_callback_axis_t callback, void* private_pointer_for_callback); int okc_register_cartpos_set_absolute_callback (okc_handle_t* okc, int robot_id, okc_callback_cartpos_t callback, void* private_pointer_for_callback); int okc_register_cartpos_axis_set_absolute_callback (okc_handle_t* okc, int robot_id, okc_callback_cartpos_axis_t callback, void* private_pointer_for_callback); int okc_register_cartpos_axis_impedance_set_absolute_callback (okc_handle_t* okc, int robot_id, okc_callback_cartpos_axis_impedance_t callback, void* private_pointer_for_callback); int okc_stop_server (okc_handle_t* okc); int okc_is_robot_avail (okc_handle_t* okc, int robot_id); int okc_is_robot_in_command_mode (okc_handle_t* okc, int robot_id); int okc_is_power_on (okc_handle_t* okc, int robot_id); int okc_set_coords_correction (okc_handle_t* okc, int robot_id, coords_t k_correction); int okc_set_axis_correction (okc_handle_t* okc, int robot_id, lbr_axis_t a_correction); int okc_get_connection_quality (okc_handle_t* okc, int robot_id, int* quality); int okc_get_position_act (okc_handle_t* okc, int robot_id, transform_t* t); int okc_get_coords_des (okc_handle_t* okc, int robot_id, coords_t* k); int okc_get_axis_act (okc_handle_t* okc, int robot_id, lbr_axis_t* l); int okc_get_jntpos_act (okc_handle_t* okc, int robot_id, fri_float_t* l); int okc_get_fri_axis_correction (okc_handle_t* okc, int robot_id, lbr_axis_t* a_correction); int okc_get_axis_des (okc_handle_t* okc, int robot_id, lbr_axis_t* l); int okc_get_torques_axis_act (okc_handle_t* okc, int robot_id, lbr_axis_t* l); int okc_get_ft_tcp_est (okc_handle_t* okc, int robot_id, coords_t* k); int okc_get_status (okc_handle_t* okc, int robot_id, int* status); int okc_request_command_mode (okc_handle_t* okc, int robot_id); int okc_request_monitor_mode (okc_handle_t* okc, int robot_id); int okc_alter_cmdFlags (okc_handle_t* okc, int robot_id, int newFlags); int okc_alter_cbmode (okc_handle_t* okc, int robot_id, int cbmode); int okc_set_axis_stiffness (okc_handle_t* okc, int robot_id, lbr_axis_t a_stiff); int okc_set_axis_damping (okc_handle_t* okc, int robot_id, lbr_axis_t a_damp); int okc_set_axis_stiffness_damping (okc_handle_t* okc, int robot_id, lbr_axis_t a_stiff, lbr_axis_t a_damp); int okc_set_cp_stiffness (okc_handle_t* okc, int robot_id, coords_t k_stiff); int okc_set_cp_damping (okc_handle_t* okc, int robot_id, coords_t k_damp); int okc_set_cp_stiffness_damping (okc_handle_t* okc, int robot_id, coords_t k_stiff, coords_t k_damp); int okc_set_cp_addTcpFT (okc_handle_t* okc, int robot_id, coords_t ExtTcpFT); int okc_switch_to_control (okc_handle_t* okc, int robot_id, int command); int okc_switch_to_cp_impedance (okc_handle_t* okc, int robot_id); int okc_switch_to_axis_impedance (okc_handle_t* okc, int robot_id); int okc_switch_to_gravcomp (okc_handle_t* okc, int robot_id); int okc_switch_to_position (okc_handle_t* okc, int robot_id); int okc_send_break_to_robot (okc_handle_t* okc, int robot_id); int okc_get_cycle_time (okc_handle_t* okc, int robot_id, fri_float_t* cycle_time); int okc_get_robot_name (okc_handle_t* okc, int robot_id, char* name, size_t size_of_name); #ifdef __cplusplus } #endif #endif