void RK_CALL UAV_kinematics::save(serialization::oarchive& A, unsigned int) const { inverse_kinematics_model::save(A,inverse_kinematics_model::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(m_base_frame) & RK_SERIAL_SAVE_WITH_NAME(m_motion_frame) & RK_SERIAL_SAVE_WITH_NAME(m_output_frame) & RK_SERIAL_SAVE_WITH_NAME(m_chain); };
int main() { // NOTE The rotation matrices below are in Yin Yang's convention (not mine!) // Airship2IMU gives matrix such that v_Airship = Airship2IMU * v_IMU double Airship2IMU_raw[] = { 0.280265845357, 0.0, 0.959922421827, 0.0, -1.0, 0.0, 0.959922421827, 0.0, -0.280265845357}; ReaK::rot_mat_3D<double> Airship2IMU(Airship2IMU_raw); ReaK::quaternion<double> Airship2IMU_quat = ReaK::quaternion<double>(Airship2IMU); ReaK::quaternion<double> IMU_orientation = Airship2IMU_quat; ReaK::vect<double,3> IMU_location(-0.896665, 0.0, 0.25711); // Room2Global gives matrix such that v_room = Room2Global * v_gbl double Room2Global_raw[] = { 0.75298919442, -0.65759795928, 0.02392064034, -0.6577626482, -0.7532241836, -0.0012758604, 0.018856608, -0.0147733946, -0.9997130464}; ReaK::rot_mat_3D<double> Room2Global(Room2Global_raw); ReaK::quaternion<double> Room2Global_quat = ReaK::quaternion<double>(Room2Global); ReaK::quaternion<double> room_orientation = invert(Room2Global_quat); ReaK::serialization::xml_oarchive out_file("airship3D_transforms.xml"); out_file & RK_SERIAL_SAVE_WITH_NAME(IMU_orientation) & RK_SERIAL_SAVE_WITH_NAME(IMU_location) & RK_SERIAL_SAVE_WITH_NAME(room_orientation); return 0; };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { if(Parent.expired()) A & RK_SERIAL_SAVE_WITH_ALIAS("Parent",shared_ptr<serialization::serializable>()); else A & RK_SERIAL_SAVE_WITH_ALIAS("Parent",Parent.lock()); A & RK_SERIAL_SAVE_WITH_NAME(Position) & RK_SERIAL_SAVE_WITH_NAME(Rotation); };
void RK_CALL navigation_scenario::save(serialization::oarchive& A, unsigned int) const { named_object::save(A,named_object::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(robot_base_frame) & RK_SERIAL_SAVE_WITH_NAME(robot_kin_model) & RK_SERIAL_SAVE_WITH_NAME(robot_jt_limits) & RK_SERIAL_SAVE_WITH_NAME(robot_proxy) & RK_SERIAL_SAVE_WITH_NAME(robot_geom_model) & RK_SERIAL_SAVE_WITH_NAME(target_frame) & RK_SERIAL_SAVE_WITH_NAME(env_geom_models) & RK_SERIAL_SAVE_WITH_NAME(env_proxy_models) & RK_SERIAL_SAVE_WITH_NAME(robot_env_proxies); };
void ChaserTargetInteractWidget::savePositions() { QString fileName = QFileDialog::getSaveFileName( this, tr("Save Positions Record..."), last_used_path, tr("Chaser-Target Positions Record (*.ctpos.rkx *.ctpos.rkb *.ctpos.pbuf)")); if( fileName == tr("") ) return; last_used_path = QFileInfo(fileName).absolutePath(); vect<double,7> chaser_positions; chaser_positions[0] = double(this->track_pos->value()) * 0.001; chaser_positions[1] = double(this->joint1_pos->value()) * 0.001; chaser_positions[2] = double(this->joint2_pos->value()) * 0.001; chaser_positions[3] = double(this->joint3_pos->value()) * 0.001; chaser_positions[4] = double(this->joint4_pos->value()) * 0.001; chaser_positions[5] = double(this->joint5_pos->value()) * 0.001; chaser_positions[6] = double(this->joint6_pos->value()) * 0.001; vect<double,3> target_position; target_position[0] = double(this->target_x->value()) * 0.001; target_position[1] = double(this->target_y->value()) * 0.001; target_position[2] = double(this->target_z->value()) * 0.001; euler_angles_TB<double> ea; ea.yaw() = double(this->target_yaw->value()) * 0.001; ea.pitch() = double(this->target_pitch->value()) * 0.001; ea.roll() = double(this->target_roll->value()) * 0.001; quaternion<double> target_quaternion = ea.getQuaternion(); try { *(serialization::open_oarchive(fileName.toStdString())) & RK_SERIAL_SAVE_WITH_NAME(chaser_positions) & RK_SERIAL_SAVE_WITH_NAME(target_position) & RK_SERIAL_SAVE_WITH_NAME(target_quaternion); } catch(...) { QMessageBox::information(this, "File Type Not Supported!", "Sorry, this file-type is not supported!", QMessageBox::Ok); return; }; };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { pose_3D<T>::save(A,pose_3D<T>::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(Velocity) & RK_SERIAL_SAVE_WITH_NAME(AngVelocity) & RK_SERIAL_SAVE_WITH_NAME(Acceleration) & RK_SERIAL_SAVE_WITH_NAME(AngAcceleration) & RK_SERIAL_SAVE_WITH_NAME(Force) & RK_SERIAL_SAVE_WITH_NAME(Torque); };
void RK_CALL ptrobot2D_test_world::save(serialization::oarchive& A, unsigned int) const { ReaK::named_object::save(A,named_object::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(world_map_file_name) & RK_SERIAL_SAVE_WITH_NAME(robot_radius) & RK_SERIAL_SAVE_WITH_NAME(max_edge_length) & RK_SERIAL_SAVE_WITH_NAME(m_space) & RK_SERIAL_SAVE_WITH_NAME(m_distance) & RK_SERIAL_SAVE_WITH_NAME(m_rand_sampler); };
void RK_CALL grid_2D::save(ReaK::serialization::oarchive& A, unsigned int) const { geometry_2D::save(A,geometry_2D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mDimensions) & RK_SERIAL_SAVE_WITH_NAME(mSquareCounts); };
void RK_CALL proximity_record_2D::save(ReaK::serialization::oarchive& A, unsigned int) const { shared_object::save(A,shared_object::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mPoint1) & RK_SERIAL_SAVE_WITH_NAME(mPoint2) & RK_SERIAL_SAVE_WITH_NAME(mDistance); };
void RK_CALL circle::save(ReaK::serialization::oarchive& A, unsigned int) const { shape_2D::save(A,shape_2D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mRadius); };
void RK_CALL capped_cylinder::save(ReaK::serialization::oarchive& A, unsigned int) const { shape_3D::save(A,shape_3D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mLength) & RK_SERIAL_SAVE_WITH_NAME(mRadius); };
void RK_CALL line_seg_2D::save(ReaK::serialization::oarchive& A, unsigned int) const { geometry_2D::save(A,geometry_2D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mStart) & RK_SERIAL_SAVE_WITH_NAME(mEnd); };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { kte_map::save(A,kte_map::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mAnchor); };
virtual void RK_CALL save(serialization::oarchive& A, unsigned int) const { A & RK_SERIAL_SAVE_WITH_NAME(t_space); };
virtual void RK_CALL save(serialization::oarchive& A, unsigned int) const { A & RK_SERIAL_SAVE_WITH_NAME(t_space) & RK_SERIAL_SAVE_WITH_NAME(tolerance) & RK_SERIAL_SAVE_WITH_NAME(maximum_iterations); };
virtual void RK_CALL save(serialization::oarchive& A, unsigned int) const { force_actuator_3D::save(A,force_actuator_3D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mDriveForce) & RK_SERIAL_SAVE_WITH_NAME(mDriveTorque); };
void RK_CALL prox_circle_circle::save(ReaK::serialization::oarchive& A, unsigned int) const { proximity_finder_2D::save(A,proximity_finder_2D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mCircle1) & RK_SERIAL_SAVE_WITH_NAME(mCircle2); };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { shared_object::save(A, shared_object::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(x); };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { named_object::save(A,named_object::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mMass) & RK_SERIAL_SAVE_WITH_NAME(mInertiaMoment); };
void RK_CALL composite_shape_3D::save(ReaK::serialization::oarchive& A, unsigned int) const { shape_3D::save(A,shape_3D::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(mShapes); };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { A & RK_SERIAL_SAVE_WITH_NAME(mFrame) & RK_SERIAL_SAVE_WITH_NAME(mUpStreamJoints) & RK_SERIAL_SAVE_WITH_NAME(mUpStream2DJoints) & RK_SERIAL_SAVE_WITH_NAME(mUpStream3DJoints); };
virtual void RK_CALL save(ReaK::serialization::oarchive& A, unsigned int) const { cost_evaluator::save(A,cost_evaluator::getStaticObjectType()->TypeVersion()); A & RK_SERIAL_SAVE_WITH_NAME(first_eval) & RK_SERIAL_SAVE_WITH_NAME(second_eval); };