Skip to content

Commit 32285c0

Browse files
committed
removed boost
1 parent c6b3fdc commit 32285c0

File tree

3 files changed

+14
-18
lines changed

3 files changed

+14
-18
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ cmake_minimum_required(VERSION 3.5)
2626

2727
project(SuperquadricLib
2828
LANGUAGES CXX
29-
VERSION 0.0.1.0)
29+
VERSION 0.1.0.0)
3030

3131
set(CMAKE_CXX_STANDARD 11)
3232

src/SuperquadricLib/SuperquadricGrasp/src/graspComputation.cpp

+12-14
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88
/**
99
* @authors: Giulia Vezzani <giulia.vezzani@iit.it>
1010
*/
11-
11+
1212
#include <cmath>
1313
#include <limits>
1414
#include <iomanip>
15-
#include <boost/range/irange.hpp>
1615

1716
#include "graspComputation.h"
1817

1918
using namespace std;
2019
using namespace Eigen;
21-
using namespace boost;
2220
using namespace SuperqModel;
2321
using namespace SuperqGrasp;
2422

@@ -63,7 +61,7 @@ void graspComputation::init(GraspParams &g_params)
6361
H_h2w.col(3).segment(0,3)=g_params.hand_superq.getSuperqCenter();
6462

6563
// Sampled points on the half of the hand ellipsoid closest to the robot palm
66-
for (auto i: irange(0, (int)sqrt(n_hands), 1))
64+
for (int i=0; i< (int)sqrt(n_hands); i++)
6765
{
6866
for (double theta=0; theta <= 2*M_PI; theta+= M_PI/((int)sqrt(n_hands)))
6967
{
@@ -263,7 +261,7 @@ bool graspComputation::get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt
263261
point_tmp(3)=1;
264262
point_tmp.segment(0,3)=point;
265263

266-
for (auto i: irange(0,6,1))
264+
for (int i=0; i<6; i++)
267265
x_tmp(i)=x[i];
268266

269267
Matrix4d H_x;
@@ -345,7 +343,7 @@ bool graspComputation::get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt
345343
{
346344
// Compute constraints
347345
Vector6d x_tmp;
348-
for (auto i: irange(0,6,1))
346+
for (int i=0; i<6; i++)
349347
x_tmp(i)=x[i];
350348

351349
Matrix4d H_x;
@@ -408,7 +406,7 @@ bool graspComputation::get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt
408406
// Constraints on obstacle superquadric avoidance
409407
if (num_superq>0)
410408
{
411-
for (auto j: irange(0,num_superq, 1))
409+
for (int j=0; j<num_superq; j++)
412410
{
413411
g[5+j]=0;
414412

@@ -480,7 +478,7 @@ bool graspComputation::get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt
480478

481479
if (num_superq>0)
482480
{
483-
for (auto j: irange(0,num_superq, 1))
481+
for (int j=0; j<num_superq; j++)
484482
{
485483
g[5+j]=0;
486484

@@ -525,9 +523,9 @@ bool graspComputation::get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt
525523
{
526524
if (num_superq==0)
527525
{
528-
for (auto j: irange(0, m, 1))
526+
for (int j=0; j<m; j++)
529527
{
530-
for (auto i: irange(0, n, 1))
528+
for (int i=0; i<n; i++)
531529
{
532530
jCol[j*(n) + i]= i;
533531
iRow[j*(n)+ i] = j;
@@ -536,9 +534,9 @@ bool graspComputation::get_bounds_info(Ipopt::Index n, Ipopt::Number *x_l, Ipopt
536534
}
537535
else
538536
{
539-
for (auto j: irange(0, m, 1))
537+
for (int j=0; j<m; j++)
540538
{
541-
for (auto i: irange(0, n, 1))
539+
for (int i=0; i<n; i++)
542540
{
543541
jCol[j*(n) + i]= i;
544542
iRow[j*(n)+ i] = j;
@@ -590,7 +588,7 @@ void graspComputation::finalize_solution(Ipopt::SolverReturn status, Ipopt::Inde
590588
Ipopt::Number obj_value, const Ipopt::IpoptData *ip_data,
591589
Ipopt::IpoptCalculatedQuantities *ip_cq)
592590
{
593-
for (auto i: irange(0,6,1))
591+
for (int i=0; i<6; i++)
594592
solution_vector(i)=x[i];
595593

596594
Matrix4d H_x;
@@ -686,7 +684,7 @@ deque<double> graspComputation::get_final_constr_values() const
686684
double graspComputation::computeObstacleValues(const Ipopt::Number *x, int k)
687685
{
688686
Vector6d pose_hand;
689-
for (auto i : irange(0,6,1))
687+
for (int i=0; i<6; i++)
690688
pose_hand(i)=x[i];
691689

692690
Matrix4d H_robot;

src/SuperquadricLib/SuperquadricVis/src/poseVis.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111

1212
#include "poseVis.h"
1313

14-
#include <boost/range/irange.hpp>
15-
1614
using namespace std;
1715
using namespace Eigen;
1816
using namespace SuperqVis;
19-
using namespace boost;
17+
2018

2119
/**********************************************/
2220
PoseVis::PoseVis()

0 commit comments

Comments
 (0)