/home/laradmin/lar/bases/phua_haptic/include/gtk_interface.h File Reference

gtk_interface.h file for this module. Contains includes, prototypes and defines. More...

#include <gtk/gtk.h>
#include <glib.h>
#include <gdk/gdkkeysyms.h>
#include <stdlib.h>
#include <stdio.h>
#include <iostream>
#include <time.h>
#include <string.h>
#include <math.h>
#include <ros/package.h>
#include <boost/lexical_cast.hpp>
#include <boost/format.hpp>
#include <humanoid_control_functions.h>
#include <miscellaneous.h>
#include <gtk_aux.h>
#include <hd_hl_apis_callbacks.h>
Include dependency graph for gtk_interface.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.



#define BACK_FACING   -1
#define FRONT_FACING   1
#define STR_LEN   512
void * interface_init (void *dummy)
 Main interface function. Object/Widget building.
void on_about_menu_item_activate (GtkObject *object, gpointer user_data)
 Callback for menu "about" dialog window construction "activate" event.
void on_ajustament_hscale_value_changed_event (GtkAdjustment *adjustment, gpointer user_data)
 Callback for constant servo speed hscale "changed" event.
void on_application_exit (GtkObject *object, gpointer user_data)
 Callback for destroy signal.
void on_back_facing_menu_item_activate (GtkMenuItem *menuitem, gpointer user_data)
 Callback for back facing menu item choice "activate" event.
void on_button_calibration_clicked (GtkWidget *widget, gpointer user_data)
 Callback for calibration button "clicked" event.
void on_button_go_toggled (GtkWidget *widget, gpointer other_toggle_button)
 Callback for the set go button "toggled" event.
void on_button_release_all_clicked (GtkWidget *widget, gpointer user_data)
 Callback for the release all servos button "clicked" event.
void on_button_set_pos_all_clicked (GtkWidget *widget, gpointer user_data)
 Callback for the set position to all servomotors "clicked" event.
void on_button_set_robot_home_pos_clicked (GtkWidget *widget, gpointer user_data)
 Callback for robot home position button "clicked" event.
void on_button_setpos_clicked (GtkWidget *widget, gpointer user_data)
 Callback for the set position button "clicked" event.
void on_button_setspeed_clicked (GtkWidget *widget, gpointer user_data)
 Callback for the set speed button "clicked" event.
void on_button_start_loop_clicked (GtkWidget *widget, gpointer user_data)
 Callback for loop start button "clicked" event.
void on_button_stop_toggled (GtkWidget *widget, gpointer other_toggle_button)
 Callback for the set stop button "toggled" event.
void on_button_test_invkin_clicked (GtkWidget *widget, gpointer user_data)
 Callback for test arm inverse kinematics button "clicked" event.
void on_button_vbuttonbox_update_robot_data_clicked (GtkWidget *widget, gpointer user_data)
 Callback for update robot data button "clicked" event.
void on_constant_speed_radio_checkbox_toggled (GtkWidget *widget, gpointer other_checkbox)
 Callback for constant speed checkbox "toggled" event.
void on_control_resolution_toggled (GtkWidget *widget, gpointer user_data)
 Callback for control resolution checkboxes "toggled" event.
void on_controled_speed_radio_checkbox_toggled (GtkWidget *widget, gpointer other_checkbox)
 Callback for controled speed checkbox "toggled" event.
void on_demo_checkboxes_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 Callback for demo choice checkboxes "toggled" event.
void on_front_facing_menu_item_activate (GtkMenuItem *menuitem, gpointer user_data)
 Callback for front facing menu item choice "activate" event.
void on_notebook_change_current_page (GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer user_data)
 Callback for notebook page "changed" event.
void on_page1_left_top_frame_combobox_changed_event (GtkWidget *widget, gpointer user_data)
 Callback for control type combo box item "changed" event.
void on_page2_select_id_combobox_for_position_changed_event (GtkWidget *widget, gpointer label_data)
 Callback for the set position id selection combo box "changed" event.
void on_user_path_demo_clear_button_clicked (GtkWidget *widget, gpointer user_data)
 Callback for clear path points button "clicked" event.
void on_user_path_demo_point_store_button_clicked (GtkWidget *widget, gpointer user_data)
 Callback for user path store points button "clicked" event.
void on_user_path_demo_run_button_clicked (GtkWidget *widget, gpointer user_data)
 Callback for user path run points button "clicked" event.
void on_workspace_scaling_toggled (GtkWidget *widget, gpointer user_data)
 Callback for workspace scaling checkboxes "toggled" event.
void select_inv_kin_combobox_changed_event (GtkWidget *widget, gpointer user_data)
 Callback for inverse kinematics combobox "changed" event.
gboolean update_watcher (gpointer data_struct)
 Function launched in timeout for taking care of label updates.
void user_path_demo_run_checkbox_toggled (GtkToggleButton *togglebutton, gpointer user_data)
 Callback for path following run once/loop checkboxes "toggled" event.

Detailed Description

gtk_interface.h file for this module. Contains includes, prototypes and defines.

Author:
pedro_cruz
Version:
2.0
Date:
7 May 2012

Definition in file gtk_interface.h.


Define Documentation

#define BACK_FACING   -1

Definition at line 60 of file gtk_interface.h.

#define FRONT_FACING   1

Definition at line 61 of file gtk_interface.h.

#define STR_LEN   512

Definition at line 59 of file gtk_interface.h.


Function Documentation

void* interface_init ( void *  dummy  ) 

Main interface function. Object/Widget building.

This function builds the interface and the widgets. It also connects the signals and events and initializes main GTK loop.

Parameters:
dummy a dummy void type input (required for threading).
Returns:
NULL.

Definition at line 1141 of file gtk_interface.cpp.

void on_about_menu_item_activate ( GtkObject *  object,
gpointer  user_data 
)

Callback for menu "about" dialog window construction "activate" event.

This function executes any time the user presses the "About" menu in the menu bar. Contains developer information and contacts.

Parameters:
object a GtkObject reference.
user_data a gpointer type data.
Returns:
none.

Definition at line 362 of file gtk_interface.cpp.

void on_ajustament_hscale_value_changed_event ( GtkAdjustment *  adjustment,
gpointer  user_data 
)

Callback for constant servo speed hscale "changed" event.

This function executes any time the user changes the hscale value.

Parameters:
adjustment a GtkAdjustment reference.
user_data a gpointer type data.
Returns:
none.

Definition at line 98 of file gtk_interface.cpp.

void on_application_exit ( GtkObject *  object,
gpointer  user_data 
)

Callback for destroy signal.

This function executes any time a destroy signal is caught by the interface.

Parameters:
object a GtkObject reference.
user_data a gpointer type data.
Returns:
none.

Definition at line 13 of file gtk_interface.cpp.

void on_back_facing_menu_item_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Callback for back facing menu item choice "activate" event.

[NOT WORKING]This function updates the control type to back-facing.

Parameters:
menuitem a GtkMenuItem reference.
user_data a gpointer.
Returns:
none.

Definition at line 747 of file gtk_interface.cpp.

void on_button_calibration_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for calibration button "clicked" event.

This function launches a small window wich is used to check the joystick calibration. Instructions are given in the window text.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 707 of file gtk_interface.cpp.

void on_button_go_toggled ( GtkWidget *  widget,
gpointer  other_toggle_button 
)

Callback for the set go button "toggled" event.

This function executes any time the user toggles the set go button and sends the command accordingly. Toggling this button untoggles the other.

Parameters:
widget a GtkWidget reference.
other_toggle_button a gpointer to the set stop button.
Returns:
none.

Definition at line 336 of file gtk_interface.cpp.

void on_button_release_all_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for the release all servos button "clicked" event.

This function executes any time the user clicks the release all servomotors button and sends the command accordingly.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 328 of file gtk_interface.cpp.

void on_button_set_pos_all_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for the set position to all servomotors "clicked" event.

This function executes any time the user presses the button send a position to all the servos. The functions will atempt to convert the position. If the position is not reachable, the joint holds still.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 376 of file gtk_interface.cpp.

void on_button_set_robot_home_pos_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for robot home position button "clicked" event.

This function executes any time the user presses the robot home position button. It executes necessary commands for setting the robot to its home position.

Parameters:
widget a GtkWidget reference.
user_data a gpointer type data.
Returns:
none.

Definition at line 24 of file gtk_interface.cpp.

void on_button_setpos_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for the set position button "clicked" event.

This function executes any time the user clicks the set position button. It sends a set position command for the joint selected in the combo box with the position converted from the entry box input.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 229 of file gtk_interface.cpp.

void on_button_setspeed_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for the set speed button "clicked" event.

This function executes any time the user presses the button to set speed.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 409 of file gtk_interface.cpp.

void on_button_start_loop_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for loop start button "clicked" event.

This function executes any time the user presses the start/stop loop button. It executes required functions for haptic/control loops.

Parameters:
widget a GtkWidget reference.
user_data a gpointer type data.
Returns:
none.

Definition at line 39 of file gtk_interface.cpp.

void on_button_stop_toggled ( GtkWidget *  widget,
gpointer  other_toggle_button 
)

Callback for the set stop button "toggled" event.

This function executes any time the user toggles the set stop button and sends the command accordingly. Toggling this button untoggles the other.

Parameters:
widget a GtkWidget reference.
other_toggle_button a gpointer to the set stop go button.
Returns:
none.

Definition at line 349 of file gtk_interface.cpp.

void on_button_test_invkin_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for test arm inverse kinematics button "clicked" event.

This function tries X, Y and Z coordinates thru inverse kinematics defined in entry text boxes.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 652 of file gtk_interface.cpp.

void on_button_vbuttonbox_update_robot_data_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for update robot data button "clicked" event.

This function executes any time the user presses the update robot data button, sending commands to reads joint values and updating limb end coordinates.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 519 of file gtk_interface.cpp.

void on_constant_speed_radio_checkbox_toggled ( GtkWidget *  widget,
gpointer  other_checkbox 
)

Callback for constant speed checkbox "toggled" event.

This function executes any time the user toggles the checkbox. It hides and shows items on the frame the checkbox is on.

Parameters:
widget a GtkWidget reference.
other_checkbox a gpointer to the other checkbox widget.
Returns:
none.

Definition at line 108 of file gtk_interface.cpp.

void on_control_resolution_toggled ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for control resolution checkboxes "toggled" event.

This function updates the data structure with chosen control resolution.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 530 of file gtk_interface.cpp.

void on_controled_speed_radio_checkbox_toggled ( GtkWidget *  widget,
gpointer  other_checkbox 
)

Callback for controled speed checkbox "toggled" event.

This function executes any time the user toggles the checkbox. It hides and shows items on the frame the checkbox is on.

Parameters:
widget a GtkWidget reference.
other_checkbox a gpointer to the other checkbox widget.
Returns:
none.

Definition at line 140 of file gtk_interface.cpp.

void on_demo_checkboxes_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

Callback for demo choice checkboxes "toggled" event.

This function is called after the user choses a demo.

Parameters:
togglebutton a GtkToggleButton reference.
user_data a gpointer.
Returns:
none.

Definition at line 765 of file gtk_interface.cpp.

void on_front_facing_menu_item_activate ( GtkMenuItem *  menuitem,
gpointer  user_data 
)

Callback for front facing menu item choice "activate" event.

[DEFAULT]This function updates the control type to front-facing.

Parameters:
menuitem a GtkMenuItem reference.
user_data a gpointer.
Returns:
none.

Definition at line 756 of file gtk_interface.cpp.

void on_notebook_change_current_page ( GtkNotebook *  notebook,
GtkNotebookPage *  page,
guint  page_num,
gpointer  user_data 
)

Callback for notebook page "changed" event.

This function is called by the "changed" event from the main page notebook.

Parameters:
notebook pointer to the notebook GtkWidget.
page pointer to the notebook page.
page_num the page number from the selected page.
user_data a gpointer.
Returns:
none.

Definition at line 739 of file gtk_interface.cpp.

void on_page1_left_top_frame_combobox_changed_event ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for control type combo box item "changed" event.

This function executes any time the user changes the control type combo box.

Parameters:
widget a GtkWidget reference.
user_data a gpointer type data.
Returns:
none.

Definition at line 72 of file gtk_interface.cpp.

void on_page2_select_id_combobox_for_position_changed_event ( GtkWidget *  widget,
gpointer  label_data 
)

Callback for the set position id selection combo box "changed" event.

This function executes any time the user toggles the combo box for id selection to set position of a joint.

Parameters:
widget a GtkWidget reference.
label_data a gpointer to the angle limitation label widget.
Returns:
none.

Definition at line 172 of file gtk_interface.cpp.

void on_user_path_demo_clear_button_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for clear path points button "clicked" event.

This function is called by the clicking of the clear button for path following.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 1022 of file gtk_interface.cpp.

void on_user_path_demo_point_store_button_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for user path store points button "clicked" event.

This function is called by the clicking of the store points button for path following.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 943 of file gtk_interface.cpp.

void on_user_path_demo_run_button_clicked ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for user path run points button "clicked" event.

This function is called by the clicking of the run points button for path following.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 998 of file gtk_interface.cpp.

void on_workspace_scaling_toggled ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for workspace scaling checkboxes "toggled" event.

This function updates the data structure with chosen workspace scale.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 591 of file gtk_interface.cpp.

void select_inv_kin_combobox_changed_event ( GtkWidget *  widget,
gpointer  user_data 
)

Callback for inverse kinematics combobox "changed" event.

This function is called by the inverse kinematics combobox "changed" event signal.

Parameters:
widget a GtkWidget reference.
user_data a gpointer.
Returns:
none.

Definition at line 905 of file gtk_interface.cpp.

gboolean update_watcher ( gpointer  data_struct  ) 

Function launched in timeout for taking care of label updates.

This function loops wainting for requests to update the labels.

Parameters:
data_struct a data structure passed on.
Returns:
NULL.

Definition at line 1046 of file gtk_interface.cpp.

void user_path_demo_run_checkbox_toggled ( GtkToggleButton *  togglebutton,
gpointer  user_data 
)

Callback for path following run once/loop checkboxes "toggled" event.

This function is called after the user choses to run the path once or in loop.

Parameters:
togglebutton a GtkToggleButton reference.
user_data a gpointer.
Returns:
none.

Definition at line 965 of file gtk_interface.cpp.

 All Classes Files Functions Variables Defines


phua_haptic
Author(s): Pedro Cruz
autogenerated on Wed Jul 23 04:33:52 2014