Skip to content

Commit

Permalink
Merge pull request #1254 from fspindle/feat_various_blender
Browse files Browse the repository at this point in the history
Feat various in mbt tutorial for data generation with Blender
  • Loading branch information
fspindle authored Oct 17, 2023
2 parents 8d77e0e + db868e0 commit fe4e89c
Show file tree
Hide file tree
Showing 532 changed files with 1,608 additions and 1,176 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ platforms/ios/build_framework.pyc
modules/java/\.idea/
.scannerwork
build
*.blend1
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ VP_OPTION(USE_PYLON Pylon "" "Include Pylon SDK support for Basle
VP_OPTION(USE_UEYE Ueye "" "Include uEye SDK support for IDS cameras" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_COMEDI Comedi "" "Include comedi (linux control and measurement device interface) support" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_FTIITSDK FTIITSDK "" "Include IIT force-torque SDK support" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_BICLOPS BICLOPS "" "Include biclops support" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_BICLOPS BICLOPS "" "Include Biclops support" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_PTU46 PTU46 "" "Include ptu-46 support" "" ON IF UNIX AND NOT WINRT AND NOT IOS)
VP_OPTION(USE_FLIRPTUSDK FlirPtuSDK "" "Include Flir PTU SDK support" "" ON IF NOT WINRT AND NOT IOS)
VP_OPTION(USE_CMU1394 CMU1394 "" "Include cmu1494 support" "" ON IF WIN32 AND NOT WINRT AND NOT IOS)
Expand Down
2 changes: 1 addition & 1 deletion ChangeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,7 @@ ViSP 2.6.2 (released July 15, 2012)
To be able to consider other user defined features the compiler should
be compatible with C++ 11 standard.
- Improvements
- Introduce a new Denavit Hartenberg representation of the Biclops head
- Introduce a new Denavit-Hartenberg representation of the Biclops head
in vpBiclops.
- Compatibility with g++ 4.7 and OpenCV 2.3.1, 2.4.0, 2.4.1
- Remove warning detected with Visual C++ /Wall flag
Expand Down
2 changes: 1 addition & 1 deletion doc/config-doxygen.in
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ TYPEDEF_HIDES_STRUCT = NO
# the optimal cache size from a speed point of view.
# Minimum value: 0, maximum value: 9, default value: 0.

LOOKUP_CACHE_SIZE = 0
LOOKUP_CACHE_SIZE = 1

#---------------------------------------------------------------------------
# Build related configuration options
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed doc/image/tutorial/tracking/img-Blender-depth.png
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Binary file removed doc/image/tutorial/tracking/img-Blender-texture.png
Diff not rendered.
2 changes: 1 addition & 1 deletion doc/mainpage.dox.in
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ in different ways. This will motivate us to continue the efforts.
*/
/*!
\ingroup group_core_math
\defgroup group_core_transformations Tranformations
\defgroup group_core_transformations Transformations
Transformations.
*/
/*!
Expand Down
514 changes: 416 additions & 98 deletions doc/tutorial/tracking/tutorial-tracking-mb-generic-rgbd-Blender.dox

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions doc/tutorial/tracking/tutorial-tracking-mb-generic.dox
Original file line number Diff line number Diff line change
Expand Up @@ -249,15 +249,20 @@ tracker.loadModel("teabox.wrl");

\subsection mb_generic_teabox_cao teabox.cao example

The content of the file `teabox.cao` used in the getting started \ref mb_generic_started_src but also in tutorial-mb-edge-tracker.cpp and
in tutorial-mb-hybrid-tracker.cpp examples is given here:
The content of the file `teabox.cao` used in the getting started \ref mb_generic_started_src but also in
tutorial-mb-edge-tracker.cpp and in tutorial-mb-hybrid-tracker.cpp examples is given here:

\includelineno tutorial/tracking/model-based/generic/model/teabox/teabox.cao

This file describes the model of the tea box corresponding to the next image:

\image html img-teabox-cao.jpg Index of the vertices used to model the tea box in cao format.

The tea box dimensions are the following:
- height (from point 0 to point 1): 0.08 meters
- length (from point 0 to point 3): 0.165 meters
- width (from point 0 to point 7): 0.068 meters

We make the choice to describe the faces of the box from the 3D points that correspond to the vertices. We provide now a line by line
description of the file. Notice that the characters after the '#' are considered as comments.
- line 1: Header of the \c .cao file
Expand Down
8 changes: 4 additions & 4 deletions example/servo-biclops/moveBiclops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* \file moveBiclops.cpp
* \example moveBiclops.cpp
*
* Example of a real robot control, the biclops robot (pan-tilt turret) by
* Example of a real robot control, the Biclops robot (pan-tilt turret) by
* Traclabs. The robot is controlled first in position, then in velocity.
*
* See http://www.traclabs.com/tracbiclops.htm for more details.
Expand Down Expand Up @@ -63,7 +63,7 @@
void usage(const char *name, const char *badparam, std::string conf)
{
fprintf(stdout, "\n\
Move the biclops robot\n\
Move the Biclops robot\n\
\n\
SYNOPSIS\n\
%s [-c <Biclops configuration file>] [-h]\n\
Expand All @@ -73,7 +73,7 @@ name);
fprintf(stdout, "\n\
OPTIONS: Default\n\
-c <Biclops configuration file> %s\n\
Sets the biclops robot configuration file.\n\n",
Sets the Biclops robot configuration file.\n\n",
conf.c_str());

if (badparam) {
Expand Down Expand Up @@ -270,7 +270,7 @@ int main(int argc, const char **argv)
#else
int main()
{
std::cout << "You do not have an biclops PT robot connected to your computer..." << std::endl;
std::cout << "You do not have an Biclops PT robot connected to your computer..." << std::endl;
return EXIT_SUCCESS;
}

Expand Down
6 changes: 3 additions & 3 deletions example/servo-biclops/servoBiclopsPoint2DArtVelocity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
* \example servoBiclopsPoint2DArtVelocity.cpp
*
* Example of eye-in-hand control law. We control here a real robot, the
* biclops robot (pan-tilt head provided by Traclabs). The velocity is computed
* Biclops robot (pan-tilt head provided by Traclabs). The velocity is computed
* in articular. The visual feature is the center of gravity of a point.
*/

Expand Down Expand Up @@ -90,7 +90,7 @@ SYNOPSIS\n\
fprintf(stdout, "\n\
OPTIONS: Default\n\
-c <Biclops configuration file> %s\n\
Sets the biclops robot configuration file.\n",
Sets the Biclops robot configuration file.\n",
conf.c_str());

if (badparam) {
Expand Down Expand Up @@ -338,7 +338,7 @@ int main(int argc, const char **argv)
#else
int main()
{
std::cout << "You do not have an biclops PT robot connected to your computer..." << std::endl;
std::cout << "You do not have an Biclops PT robot connected to your computer..." << std::endl;
return EXIT_SUCCESS;
}
#endif
6 changes: 3 additions & 3 deletions example/servo-pioneer/servoPioneerPanSegment3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ int main(int argc, char **argv)
double qm_pan = 0; // Measured pan position (tilt is not handled in that example)

#ifdef USE_REAL_ROBOT
// Initialize the biclops head
// Initialize the Biclops head

vpRobotBiclops biclops("/usr/share/BiclopsDefault.cfg");
biclops.setDenavitHartenbergModel(vpBiclops::DH1);
Expand Down Expand Up @@ -158,7 +158,7 @@ int main(int argc, char **argv)
#endif

vpPioneerPan robot_pan; // Generic robot that computes the velocities for
// the pioneer and the biclops head
// the pioneer and the Biclops head

// Camera parameters. In this experiment we don't need a precise
// calibration of the camera
Expand Down Expand Up @@ -379,7 +379,7 @@ int main(int argc, char **argv)

std::cout << "Send velocity to the pionner: " << v_pioneer[0] << " m/s " << vpMath::deg(v_pioneer[1])
<< " deg/s" << std::endl;
std::cout << "Send velocity to the biclops head: " << vpMath::deg(v_biclops[0]) << " deg/s" << std::endl;
std::cout << "Send velocity to the Biclops head: " << vpMath::deg(v_biclops[0]) << " deg/s" << std::endl;

pioneer.setVelocity(vpRobot::REFERENCE_FRAME, v_pioneer);
biclops.setVelocity(vpRobot::ARTICULAR_FRAME, v_biclops);
Expand Down
82 changes: 40 additions & 42 deletions modules/core/include/visp3/core/vpColVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -485,40 +485,6 @@ class VISP_EXPORT vpColVector : public vpArray2D<double>
*/
void insert(unsigned int i, const vpColVector &v);

/*!
* Insert a column vector.
* \param i : Index of the first element to introduce. This index starts from 0.
* \param v : Column vector to insert.
*
* The following example shows how to use this function:
* \code
* #include <visp3/core/vpColVector.h>
*
* int main()
* {
* vpColVector v(4);
* for (unsigned int i=0; i < v.size(); i++)
* v[i] = i;
* std::cout << "v: " << v.t() << std::endl;
*
* vpColVector w(2);
* for (unsigned int i=0; i < w.size(); i++)
* w[i] = i+10;
* std::cout << "w: " << w.t() << std::endl;
*
* v.insert(w, 1);
* std::cout << "v: " << v.t() << std::endl;
* }
* \endcode
* It produces the following output:
* \code
* v: 0 1 2 3
* w: 10 11
* v: 0 10 11 3
* \endcode
*/
void insert(const vpColVector &v, unsigned int i);

/*!
* Print using Maple syntax, to copy/paste in Maple later.
*
Expand Down Expand Up @@ -1376,7 +1342,7 @@ class VISP_EXPORT vpColVector : public vpArray2D<double>
* Retrieve a vpColVector object from a JSON representation.
*
* @param j : JSON representation to convert.
* @param me : Converted object.
* @param v : Converted object.
*/
friend void from_json(const nlohmann::json &j, vpColVector &v);
#endif
Expand All @@ -1387,11 +1353,48 @@ class VISP_EXPORT vpColVector : public vpArray2D<double>
*/
//@{
/*!
* \deprecated Provided only for compat with previous releases.
* This function does nothing.
* \deprecated Provided only for compat with previous releases.
* This function does nothing.
*/
vp_deprecated void init() { }

/*!
* \deprecated Provided only for compat with previous releases. Use rather
* insert(unsigned int i, const vpColVector &v)
*
* Insert a column vector.
* \param i : Index of the first element to introduce. This index starts from 0.
* \param v : Column vector to insert.
*
* The following example shows how to use this function:
* \code
* #include <visp3/core/vpColVector.h>
*
* int main()
* {
* vpColVector v(4);
* for (unsigned int i=0; i < v.size(); i++)
* v[i] = i;
* std::cout << "v: " << v.t() << std::endl;
*
* vpColVector w(2);
* for (unsigned int i=0; i < w.size(); i++)
* w[i] = i+10;
* std::cout << "w: " << w.t() << std::endl;
*
* v.insert(w, 1);
* std::cout << "v: " << v.t() << std::endl;
* }
* \endcode
* It produces the following output:
* \code
* v: 0 1 2 3
* w: 10 11
* v: 0 10 11 3
* \endcode
*/
vp_deprecated void insert(const vpColVector &v, unsigned int i);

/*!
* \deprecated You should rather use extract().
*/
Expand All @@ -1400,11 +1403,6 @@ class VISP_EXPORT vpColVector : public vpArray2D<double>
return vpColVector(*this, first_row - 1, last_row - first_row + 1);
}

/*!
* \deprecated You should rather use eye()
*/
vp_deprecated void setIdentity(const double &val = 1.0);

/*!
* \deprecated You should rather use stack(const vpColVector &)
*/
Expand Down
81 changes: 79 additions & 2 deletions modules/core/include/visp3/core/vpHomogeneousMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,88 @@ class VISP_EXPORT vpHomogeneousMatrix : public vpArray2D<double>
void extract(vpTranslationVector &t) const;
void extract(vpQuaternionVector &q) const;

// Load an homogeneous matrix from a file
/*!
* Read an homogeneous matrix from an input file stream. The
* homogeneous matrix is considered as a 4 by 4 matrix.
*
* \param f : Input file stream.
*
* The code below shows how to get an homogeneous matrix from a file.
*
* \code
* vpHomogeneousMatrix M;
*
* std::ifstream f("homogeneous.dat");
* M.load(f);
* \endcode
*
* \sa load(const std::string &), save(std::ifstream &)
*/
void load(std::ifstream &f);
// Save an homogeneous matrix in a file

/*!
* Read an homogeneous matrix from an input file. The
* homogeneous matrix is considered as a 4 by 4 matrix.
*
* \param filename : Input file name.
*
* The code below shows how to get an homogeneous matrix from a file.
*
* \code
* vpHomogeneousMatrix M;
*
* M.load("homogeneous.dat");
* \endcode
*
* \sa load(std::ifstream &), save(const std::string &)
*/
void load(const std::string &filename);

/*!
* Save an homogeneous matrix in an output file stream.
*
* \param f : Output file stream. The homogeneous matrix is saved as a 4 by 4 matrix.
*
* The code below shows how to save an homogeneous matrix in a file.
*
* \code
* // Construct an homogeneous matrix
* vpTranslationVector t(1,2,3);
* vpRxyzVector r(M_PI, 0, -M_PI/4.);
* vpRotationMatrix R(r);
* vpHomogeneousMatrix M(t, R);
*
* // Save the content of the matrix in "homogeneous.dat"
* std::ofstream f("homogeneous.dat");
* M.save(f);
* \endcode
*
* \sa save(const std::string &), load(std::ifstream &)
*/
void save(std::ofstream &f) const;

/*!
* Save an homogeneous matrix in a file.
*
* \param filename : Output file name. The homogeneous matrix is saved as a 4 by 4 matrix.
*
* The code below shows how to save an homogeneous matrix in a file.
*
* \code
* // Construct an homogeneous matrix
* vpTranslationVector t(1,2,3);
* vpRxyzVector r(M_PI, 0, -M_PI/4.);
* vpRotationMatrix R(r);
* vpHomogeneousMatrix M(t, R);
*
* // Save the content of the matrix in "homogeneous.dat"
* M.save("homogeneous.dat");
* \endcode
*
* \sa save(std::ofstream &), load(const std::string &)
*/
void save(const std::string &filename) const;

vpHomogeneousMatrix &operator=(const vpHomogeneousMatrix &M);
vpHomogeneousMatrix operator*(const vpHomogeneousMatrix &M) const;
vpHomogeneousMatrix &operator*=(const vpHomogeneousMatrix &M);
Expand Down
9 changes: 5 additions & 4 deletions modules/core/src/math/matrix/vpColVector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -718,10 +718,6 @@ void vpColVector::insert(unsigned int i, const vpColVector &v)
memcpy(data + i, v.data, sizeof(double) * v.rowNum);
}
}
void vpColVector::insert(const vpColVector &v, unsigned int i)
{
insert(i, v);
}

int vpColVector::print(std::ostream &s, unsigned int length, char const *intro) const
{
Expand Down Expand Up @@ -905,6 +901,11 @@ std::ostream &vpColVector::matlabPrint(std::ostream &os) const

#if defined(VISP_BUILD_DEPRECATED_FUNCTIONS)

void vpColVector::insert(const vpColVector &v, unsigned int i)
{
insert(i, v);
}

void vpColVector::insert(const vpColVector &v, unsigned int r, unsigned int c)
{
(void)c;
Expand Down
Loading

0 comments on commit fe4e89c

Please sign in to comment.