void mtsTeleop::master_pose_cb(const geometry_msgs::PoseConstPtr &msg) { counter_master_cb_++; mtsROSToCISST((*msg), mtm_pose_cur_); // initialize mtm_pose_pre_ if (counter_master_cb_ == 1) { mtm_pose_pre_.Assign(mtm_pose_cur_); } }
void dvrkTeleopQWidget::slave_pose_cb(const geometry_msgs::PoseStamped &msg) { mtsROSToCISST(msg, psm_pose_cur_); }
void dvrkTeleopQWidget::master_pose_cb(const geometry_msgs::PoseStamped &msg) { mtsROSToCISST(msg, mtm_pose_cur_); }
void dvrkTeleopQWidget::slave_pose_cb(const geometry_msgs::PoseConstPtr &msg) { mtsROSToCISST((*msg), psm_pose_cur_); }
void dvrkTeleopQWidget::master_pose_cb(const geometry_msgs::PoseConstPtr &msg) { mtsROSToCISST((*msg), mtm_pose_cur_); }
// command psm pose from teleop void mtm_cmd_pose_cb(const geometry_msgs::Pose &msg) { mtsROSToCISST(msg, mtm_pose_command); }
void mtsTeleop::slave_pose_cb(const geometry_msgs::PoseConstPtr &msg) { counter_slave_cb_++; mtsROSToCISST((*msg), psm_pose_cur_); }
void mtsROSToCISST(const geometry_msgs::PoseStamped & rosData, prmPositionCartesianSet & cisstData) { mtsROSToCISST(rosData.pose, cisstData); }
void mtsROSToCISST(const cisst_msgs::prmFixtureGainCartesianSet & rosData, prmFixtureGainCartesianSet & cisstData) { vct3 vct3Data; // holder for vct3 data vctMatRot3 rotationData; // holder for rotation data vctFrm4x4 poseData; // holder for pose data // vf pos/rot mtsROSToCISST(rosData.ForcePosition, vct3Data); cisstData.SetForcePosition(vct3Data); mtsROSToCISST(rosData.ForceOrientation, rotationData); cisstData.SetForceOrientation(rotationData); mtsROSToCISST(rosData.TorqueOrientation, rotationData); cisstData.SetTorqueOrientation(rotationData); // force gains mtsROSToCISST(rosData.PosStiffPos, vct3Data); cisstData.SetPositionStiffnessPos(vct3Data); mtsROSToCISST(rosData.PosStiffNeg, vct3Data); cisstData.SetPositionStiffnessNeg(vct3Data); mtsROSToCISST(rosData.PosDampingPos, vct3Data); cisstData.SetPositionDampingPos(vct3Data); mtsROSToCISST(rosData.PosDampingNeg, vct3Data); cisstData.SetPositionDampingNeg(vct3Data); mtsROSToCISST(rosData.ForceBiasPos, vct3Data); cisstData.SetForceBiasPos(vct3Data); mtsROSToCISST(rosData.ForceBiasNeg, vct3Data); cisstData.SetForceBiasNeg(vct3Data); // toqrue gains mtsROSToCISST(rosData.OriStiffPos, vct3Data); cisstData.SetOrientationStiffnessPos(vct3Data); mtsROSToCISST(rosData.OriStiffNeg, vct3Data); cisstData.SetOrientationStiffnessNeg(vct3Data); mtsROSToCISST(rosData.OriDampingPos, vct3Data); cisstData.SetOrientationDampingPos(vct3Data); mtsROSToCISST(rosData.OriDampingNeg, vct3Data); cisstData.SetOrientationDampingNeg(vct3Data); mtsROSToCISST(rosData.TorqueBiasPos, vct3Data); cisstData.SetTorqueBiasPos(vct3Data); mtsROSToCISST(rosData.TorqueBiasNeg, vct3Data); cisstData.SetTorqueBiasNeg(vct3Data); }
void mtsROSToCISST(const geometry_msgs::WrenchStamped & rosData, prmForceCartesianSet & cisstData) { mtsROSToCISST(rosData.wrench, cisstData); }