Commit 0a1ce876 authored by Nicolas Van der Noot's avatar Nicolas Van der Noot

remove user_kinematics_model

parent 4db217ff
......@@ -294,12 +294,8 @@ The following procedure can be used to generate new models of the COMAN robot (o
* Launch `./Gen_mds_user path_to_mbs user_all_id`
* Move the created file in the new folder: `mv userfctR/user_all_id.h symbolicR/new_version/`
* Go in the [dataR/extra](dataR/extra) folder, and create the folder *new_version*. Create the related *specific_simu_index.cc* file.
* Generate the *user_kinematics_model.c* file like this:
* Generate the *accelred* file (*mbs_accelred_new_version.c*) where the F sensors are set for *Position*, *Rotation Matrix* and *Velocity* and place this file in [this folder](userFiles/simu/forces/contactGeom/python).
* Go inside [the same folder](userFiles/simu/forces/contactGeom/python) and launch `python kinematics_gen.py mbs_accelred_new_version.c ../../../../../symbolicR/new_version/user_kinematics_model.c`
* Re-generate the *accelred* file, but unckecking *Position*, *Rotation Matrix* and *Velocity* (for computational speed) and place it in *symbolicR/new_version*.
* In [CMakeLists.txt](workR/CMakeLists.txt) change `set( WALKER_VERSION "old_version" )` by `set( WALKER_VERSION "new_version" )`
* Add a new COMAN version name *NEW_NAME* in [SimuOptions.h](userFiles/simu/io/simu_options/SimuOptions.h).
* Add a new version name *NEW_NAME* in [SimuOptions.h](userFiles/simu/io/simu_options/SimuOptions.h).
* Add the line `else if (!strcmp(WALKER_VERSION, "new_version")) return NEW_NAME;` in [SimuOptions.c](userFiles/simu/io/simu_options/SimuOptions.c).
* Adapt the files in the [indexes](userFiles/simu/main/indexes) folder ([SimuIndex.cc](userFiles/simu/main/indexes/SimuIndex.cc), [SimuIndex.hh](userFiles/simu/main/indexes/SimuIndex.hh), [ModelSimuIndex.cc](userFiles/simu/main/indexes/ModelSimuIndex.cc) and [ModelSimuIndex.hh](userFiles/simu/main/indexes/ModelSimuIndex.hh)).
* You might also have to adapt the following files:
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -66,48 +66,7 @@ namespace ContactGeom{
void user_contact_kinematics(std::vector<KinInfo> &kin_info_list, MainUnionShape *main_union, MbsData *mbs_data,
double **PxF_tab, double **VxF_tab, double **OMxF_tab, double ***RxF_tab)
{
int count_own;
SimuOptions *options;
options = mbs_data->user_IO->options;
switch (options->coman_model)
{
case INIT_FEET_COMAN:
case LONG_FEET_COMAN:
case FLEX_FEET_COMAN:
main_union->MbsSensorCompute();
break;
case SHORT_FEET_COMAN:
if (kin_info_list.size() == 10)
{
user_kinematics_model(mbs_data, PxF_tab, RxF_tab, VxF_tab, OMxF_tab);
update_kin_info(PxF_tab[0], RxF_tab[0], VxF_tab[0], OMxF_tab[0], kin_info_list, mbs_data->Nsensor + 1 );
update_kin_info(PxF_tab[1], RxF_tab[1], VxF_tab[1], OMxF_tab[1], kin_info_list, mbs_data->Nsensor + 2 );
update_kin_info(PxF_tab[2], RxF_tab[2], VxF_tab[2], OMxF_tab[2], kin_info_list, mbs_data->Nsensor + 3 );
update_kin_info(PxF_tab[3], RxF_tab[3], VxF_tab[3], OMxF_tab[3], kin_info_list, mbs_data->Nsensor + 5 );
update_kin_info(PxF_tab[4], RxF_tab[4], VxF_tab[4], OMxF_tab[4], kin_info_list, mbs_data->Nsensor + 6 );
update_kin_info(PxF_tab[5], RxF_tab[5], VxF_tab[5], OMxF_tab[5], kin_info_list, mbs_data->Nsensor + 8 );
update_kin_info(PxF_tab[6], RxF_tab[6], VxF_tab[6], OMxF_tab[6], kin_info_list, mbs_data->Nsensor + 9 );
update_kin_info(PxF_tab[7], RxF_tab[7], VxF_tab[7], OMxF_tab[7], kin_info_list, mbs_data->Nsensor + 10);
update_kin_info(PxF_tab[8], RxF_tab[8], VxF_tab[8], OMxF_tab[8], kin_info_list, mbs_data->Nsensor + 11);
update_kin_info(PxF_tab[9], RxF_tab[9], VxF_tab[9], OMxF_tab[9], kin_info_list, mbs_data->Nsensor + 12);
}
else
{
main_union->MbsSensorCompute();
}
break;
default:
std::cout << "Error: unknown COMAN model: " << options->coman_model << " !" << std::endl;
exit(EXIT_FAILURE);
}
// user own models
main_union->MbsOwnSensorCompute();
main_union->MbsSensorCompute();
}
/*! \brief update 'kin_info_list'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment