Skip to content
This repository was archived by the owner on Apr 6, 2020. It is now read-only.

Commit ae671a5

Browse files
committed
Update README.md
Specified CODYCO_DIR and CODYCO_ROOT env. variables and updated some instructions.
1 parent 925a90f commit ae671a5

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

src/simulink/README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
Simulink Library for Whole Body Control
2-
----------------------------------------------------------
1+
WBI Toolbox (WBI-T) - Simulink Wrapper for Whole Body Control
2+
-------------------------------------------------------------
33

4-
This document describes basic instructions on how to use this library, *tips and tricks* to do so and a walkthrough to get you started using it. Simulink blocks consist of S-functions (http://goo.gl/1GuHVd) which allow C/C++ user specific code compiled as Matlab Executable (MEX) files, thus extending the capabilities of the Simulink environment. In other words, MEX files have been created linking YARP, iCub and **iDynTree** (a more efficient and generic YARP-based robot dynamics library than its predecessor iDyn - http://goo.gl/BnGzKr) and wrapping the **Whole Body Interface** described in http://goo.gl/dBWO3k. Soft-Real Time is ensured by slowing down the simulation to respect a user specified rate. The following video shows a quick introduction to the way it works. For further information read the sections below.
4+
5+
NEWS: The WBI Toolbox will be presented at ICRA 2014 with a live demo on the Gazebo simulator and (probably) on the real robot!!! Check out the whole program here: http://goo.gl/L76DbM
6+
7+
This document describes basic instructions on how to use this library, *tips and tricks* to do so and a walkthrough to get you started using it. Simulink blocks consist of S-functions (http://goo.gl/1GuHVd) which allow C/C++ user specific code compiled as Matlab Executable (MEX) files, thus extending the capabilities of the Simulink environment. In other words, MEX files have been created linking YARP, iCub and **iDynTree** (a more efficient and generic YARP-based robot dynamics library than its predecessor iDyn - http://goo.gl/BnGzKr) andcodyco wrapping the **Whole Body Interface** described in http://goo.gl/dBWO3k. Soft-Real Time is ensured by slowing down the simulation to respect a user specified rate. The following video shows a quick introduction to the way it works. For further information read the sections below.
58

69

710
<p align="center">
@@ -25,7 +28,7 @@ alt="Overview of the Simulink library for Whole Body Control" width="480" height
2528

2629

2730
###### Installation
28-
Before going ahead with the compilation of the library, make sure that you have MATLAB and Simulink properly installed and running. Then, check that the MEX compiler for MATLAB is setup and working. For this you can try compiling some of MATLAB C code examples as described in [http://www.mathworks.com/help/matlab/ref/mex.html#btz1tb5-12].
31+
Before going ahead with the compilation of the library, make sure that you have MATLAB and Simulink properly installed and running. Then, check that the MEX compiler for MATLAB is setup and working. For this you can try compiling some of MATLAB C code examples as described in [http://www.mathworks.com/help/matlab/ref/mex.html#btz1tb5-12]. In the following steps assume that `$CODYCO_DIR` points to the `/build` directory of your CoDyCo installation and `$CODYCO_ROOT` to the corresponding `/src` directory.
2932

3033
- **Compiling the Simulink Library.** When configuring the CMakeLists for CoDyCo make sure to enable the SIMULINK_LIBRARY flag by doing
3134
```bash
@@ -34,7 +37,7 @@ Before going ahead with the compilation of the library, make sure that you have
3437
```
3538
In the UI look for *SIMULINK_LIBRARY* and press enter to turn it ON/OFF. Then as usual type c to configure until no stars (*) show up and finally g to generate. Finally to compile type `make`.
3639

37-
- **Soft Real Time.** For the time being, this block has been taken from the Matlab File Exchange [http://goo.gl/8LMWGD] and it has to be compiled from within MATLAB by changing its current directory to `${CODYCO_ROOT}/simulink/controllers/RealTimeSlower` and typing `mex sfun_time.c`. This will create a mex file according to your operating system and architecture, e.g. for a 32bits Linux-based OS you will get sfun_time.mexglx. This mex file will be used by the example models included in `${CODYCO_ROOT}/simulink/controllers/` to slow down the simulation for a user-specified rate. It is recommended to define the rate in this block with a variable such as **Ts** and mask your final model where the user can later define the rate.
40+
~~**Soft Real Time.** For the time being, this block has been taken from the Matlab File Exchange [http://goo.gl/8LMWGD] and it has to be compiled from within MATLAB by changing its current directory to `${CODYCO_ROOT}/simulink/controllers/RealTimeSlower` and typing `mex sfun_time.c`. This will create a mex file according to your operating system and architecture, e.g. for a 32bits Linux-based OS you will get sfun_time.mexglx. This mex file will be used by the example models included in `${CODYCO_ROOT}/simulink/controllers/` to slow down the simulation for a user-specified rate. It is recommended to define the rate in this block with a variable such as **Ts** and mask your final model where the user can later define the rate.~~ This block will be soon deprecated and replaced by the ySynchronizer block. It is still present in the library and the user does not need to compile it manually.
3841

3942

4043
###### Before Using the Simulink Library
@@ -68,17 +71,17 @@ You will find a few controllers and models for testing that have already been te
6871
Linux, Windows, MAC OS X
6972

7073
###### To Do List
71-
- [ ] Debug incompatibilities with Gazebo (at the c++ whole body interface level) - with Francesco Romano
74+
- [x] ~~Debug incompatibilities with Gazebo (at the c++ whole body interface level)~~ - with Francesco Romano
7275
- [x] ~~Compile the Soft Real Time mex as another module of the library. Possibly make our own.~~
7376
- [x] ~~Modify YarpRead module so that you can specify the port you wanna read from and where you want it to connect. Connection should be done inside the block.~~
7477
- [x] ~~Restructure code for wbInterface~~
7578
- [x] ~~Expose computeMass() and generalizedBiasForces()~~
76-
- [ ] Debug computeMass() and generalizedBiasForces()
79+
- [x] ~~Debug computeMass() and generalizedBiasForces()~~
7780
- [ ] Documentation (Functions, etc)
7881
- [ ] Include postural constraint in FourthCOMController.
7982
- [ ] ZMP block.
8083
- [ ] Check minimum jerk generator.
81-
- [ ] Reproduce COM Controller as a Force Controlled version.
84+
- [x] ~~Reproduce COM Controller as a Force Controlled version.~~
8285
- [x] ~~Documentation (Installation)~~
8386
- [x] ~~How to properly get dynamic libraries linked at runtime on MAC OS X.~~
8487
- [x] ~~Divide blocks into subgroups (actuators, estimators, etc) and put them all together as a real Simulink Library :D~~

0 commit comments

Comments
 (0)