Node responsible for handling the communication between the PHANToM device and V-REP. Connects to V-REP and joystick simultaneously, returning the device status to the simulator and updating the received forces. Implements joint-by-joint robot control and inverse kinematics control when combined with the joystick, or inverse kinematics when alone, using a polynomial-like trajectory generation. The operation mode depends on the V-REP scene, and on the state selected by Button 2. It uses both ROS and OpenHaptics. More...
#include <humanoid_simulation/humanoid_simulation.h>
Go to the source code of this file.
Macros | |
| #define | PI 3.14159265 |
Functions | |
| HDboolean | CheckCalibration () |
| int | command_method (0) |
| void | feedbackCallback (const geometry_msgs::Vector3Stamped &msg) |
| int | main (int argc, char **argv) |
| void | mainLoop (int argc, char **argv) |
| void | objectHandles () |
| int | previous_state_0 (0) |
| int | previous_state_1 (0) |
| HDCallbackCode HDCALLBACK | SchedulerCallback (void *pUserData) |
| void | setRobotPosition (double &time) |
| void | setupMessaging (ros::NodeHandle nh) |
| void | simulationCallback (const vrep_common::VrepInfo &msg) |
| double | simulationTime (0) |
| int | simulator_state (4) |
| HDCallbackCode HDCALLBACK | UpdateCalibrationCallback (void *pUserData) |
Variables | |
| HDdouble | base_force [3] |
| HDdouble | base_torque [3] |
| ros::Publisher | command_joints_position_pub |
| ros::Publisher | command_left_joints_position_pub |
| ros::Publisher | command_pelvis_position_pub |
| ros::Publisher | command_pelvis_position_stamped_pub |
| ros::Publisher | command_right_joints_position_pub |
| ros::Subscriber | feedback_force_filtered_sub |
| HDSchedulerHandle | gCallbackHandle = HD_INVALID_HANDLE |
| vrep_common::simRosGetObjectGroupData | joint_handles |
| ros::ServiceClient | joint_handles_srv |
| vrep_common::JointSetStateData | joint_target |
| vector< int > | left_joint_handle |
| vrep_common::JointSetStateData | left_joint_target |
| string | move_type = "move_down" |
| ros::ServiceClient | object_handles_srv |
| geometry_msgs::Point | pelvis_target |
| geometry_msgs::Point | pelvis_target_init |
| geometry_msgs::PointStamped | pelvis_target_stamped |
| double | poly_time |
| vector< int > | right_joint_handle |
| vrep_common::JointSetStateData | right_joint_target |
| int | scale_div = 1700 |
| ros::Subscriber | simulation_state_sub |
| static device_state | state |
| double | time_inc = 0.05 |
Node responsible for handling the communication between the PHANToM device and V-REP. Connects to V-REP and joystick simultaneously, returning the device status to the simulator and updating the received forces. Implements joint-by-joint robot control and inverse kinematics control when combined with the joystick, or inverse kinematics when alone, using a polynomial-like trajectory generation. The operation mode depends on the V-REP scene, and on the state selected by Button 2. It uses both ROS and OpenHaptics.
Definition in file phantom_control_vrep.cpp.
| #define PI 3.14159265 |
Definition at line 18 of file phantom_control_vrep.cpp.
| HDboolean CheckCalibration | ( | ) |
Definition at line 446 of file phantom_control_vrep.cpp.
| int command_method | ( | 0 | ) |
| void feedbackCallback | ( | const geometry_msgs::Vector3Stamped & | msg | ) |
Definition at line 364 of file phantom_control_vrep.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 513 of file phantom_control_vrep.cpp.
| void mainLoop | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 417 of file phantom_control_vrep.cpp.
| void objectHandles | ( | ) |
Definition at line 381 of file phantom_control_vrep.cpp.
| int previous_state_0 | ( | 0 | ) |
| int previous_state_1 | ( | 0 | ) |
| HDCallbackCode HDCALLBACK SchedulerCallback | ( | void * | pUserData | ) |
Definition at line 70 of file phantom_control_vrep.cpp.
| void setRobotPosition | ( | double & | time | ) |
Definition at line 194 of file phantom_control_vrep.cpp.
| void setupMessaging | ( | ros::NodeHandle | nh | ) |
Definition at line 401 of file phantom_control_vrep.cpp.
| void simulationCallback | ( | const vrep_common::VrepInfo & | msg | ) |
Definition at line 352 of file phantom_control_vrep.cpp.
| double simulationTime | ( | 0 | ) |
| int simulator_state | ( | 4 | ) |
| HDCallbackCode HDCALLBACK UpdateCalibrationCallback | ( | void * | pUserData | ) |
Definition at line 433 of file phantom_control_vrep.cpp.
| HDdouble base_force[3] |
Definition at line 25 of file phantom_control_vrep.cpp.
| HDdouble base_torque[3] |
Definition at line 24 of file phantom_control_vrep.cpp.
| ros::Publisher command_joints_position_pub |
Definition at line 35 of file phantom_control_vrep.cpp.
| ros::Publisher command_left_joints_position_pub |
Definition at line 36 of file phantom_control_vrep.cpp.
| ros::Publisher command_pelvis_position_pub |
Definition at line 33 of file phantom_control_vrep.cpp.
| ros::Publisher command_pelvis_position_stamped_pub |
Definition at line 34 of file phantom_control_vrep.cpp.
| ros::Publisher command_right_joints_position_pub |
Definition at line 37 of file phantom_control_vrep.cpp.
| ros::Subscriber feedback_force_filtered_sub |
Definition at line 38 of file phantom_control_vrep.cpp.
| HDSchedulerHandle gCallbackHandle = HD_INVALID_HANDLE |
Definition at line 27 of file phantom_control_vrep.cpp.
| vrep_common::simRosGetObjectGroupData joint_handles |
Definition at line 41 of file phantom_control_vrep.cpp.
| ros::ServiceClient joint_handles_srv |
Definition at line 32 of file phantom_control_vrep.cpp.
| vrep_common::JointSetStateData joint_target |
Definition at line 45 of file phantom_control_vrep.cpp.
| vector<int> left_joint_handle |
Definition at line 49 of file phantom_control_vrep.cpp.
| vrep_common::JointSetStateData left_joint_target |
Definition at line 46 of file phantom_control_vrep.cpp.
| string move_type = "move_down" |
Definition at line 66 of file phantom_control_vrep.cpp.
| ros::ServiceClient object_handles_srv |
Definition at line 31 of file phantom_control_vrep.cpp.
| geometry_msgs::Point pelvis_target |
Definition at line 42 of file phantom_control_vrep.cpp.
| geometry_msgs::Point pelvis_target_init |
Definition at line 43 of file phantom_control_vrep.cpp.
| geometry_msgs::PointStamped pelvis_target_stamped |
Definition at line 44 of file phantom_control_vrep.cpp.
| double poly_time |
Definition at line 65 of file phantom_control_vrep.cpp.
| vector<int> right_joint_handle |
Definition at line 50 of file phantom_control_vrep.cpp.
| vrep_common::JointSetStateData right_joint_target |
Definition at line 47 of file phantom_control_vrep.cpp.
| int scale_div = 1700 |
Definition at line 67 of file phantom_control_vrep.cpp.
| ros::Subscriber simulation_state_sub |
Definition at line 39 of file phantom_control_vrep.cpp.
|
static |
Definition at line 22 of file phantom_control_vrep.cpp.
| double time_inc = 0.05 |
Definition at line 64 of file phantom_control_vrep.cpp.