Skip to content

Commit

Permalink
Merge pull request #60 from erwincoumans/master
Browse files Browse the repository at this point in the history
linux/mac osx fixes
  • Loading branch information
erwincoumans authored Dec 19, 2020
2 parents 36087a2 + dc603eb commit a80bc19
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion examples/laikago_opengl_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ struct LaikagoSimulation {
result[j++] = visual_X_world.translation[0];
result[j++] = visual_X_world.translation[1];
result[j++] = visual_X_world.translation[2];
Algebra::Quaternion orn = Algebra::matrix_to_quat(visual_X_world.rotation);
auto orn = Algebra::matrix_to_quat(visual_X_world.rotation);
result[j++] = orn.x();
result[j++] = orn.y();
result[j++] = orn.z();
Expand Down
2 changes: 1 addition & 1 deletion examples/tiny_urdf_parser_opengl_example.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ int main(int argc, char* argv[]) {
visualizer.convert_visuals(urdf_structures, texture_path);


int num_total_threads = 256;
int num_total_threads = 16;
std::vector<int> visual_instances;
std::vector<int> num_instances;
int num_base_instances;
Expand Down
4 changes: 2 additions & 2 deletions examples/tiny_visual_instance_generator.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ struct TinyVisualInstanceGenerator : public VisualInstanceGenerator
}
virtual void create_visual_instance(int shape_uid, std::vector<int>& visual_instances )
{
OpenGLUrdfVisualizer<MyAlgebra>::TinyVisualLinkInfo& vis_link = viz_.m_b2vis[shape_uid];
auto& vis_link = viz_.m_b2vis[shape_uid];
for (int v = 0; v < vis_link.visual_shape_uids.size(); v++)
{
int visual_shape = vis_link.visual_shape_uids[v];
Expand All @@ -31,4 +31,4 @@ struct TinyVisualInstanceGenerator : public VisualInstanceGenerator
}
};

#endif
#endif
2 changes: 1 addition & 1 deletion src/link.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ struct Link {
conv.link_name = link_name;
conv.joint_name = joint_name;
conv.f_ext = tds::clone<Algebra, AlgebraTo>(f_ext);
conv.visual_ids = visual_ids;
conv.visual_instance_uids = visual_instance_uids;
for (const auto &x : X_visuals) {
conv.X_visuals.push_back(x.template clone<AlgebraTo>());
}
Expand Down
8 changes: 4 additions & 4 deletions src/math/eigen_algebra.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ struct EigenAlgebraT {
* input a storage for the result
* output boolean is_positive_definite if operation succeeded
*/
static bool inverse(const MatrixX& A, MatrixX& a) {
static bool symmetric_inverse(const MatrixX& A, MatrixX& a) {
assert(a.cols() == A.cols());
assert(a.rows() == A.rows());

Expand Down Expand Up @@ -462,11 +462,11 @@ struct EigenAlgebraT {
m.row(i) = v;
}

EIGEN_ALWAYS_INLINE static void assign_row(MatrixX &m, Index i,
EIGEN_ALWAYS_INLINE static void assign_row(MatrixX& m, Index i,
const SpatialVector &v) {

m.block<1, 3>(i, 0) = v.top;
m.block<1, 3>(i, 3) = v.bottom;
m.template block<1, 3>(i, 0) = v.top;
m.template block<1, 3>(i, 3) = v.bottom;


}
Expand Down
6 changes: 3 additions & 3 deletions src/mb_constraint_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class MultiBodyConstraintSolver {
// } else {
submit_profile_timing("inverse_mass_matrix_a");
is_positive_definite_a =
Algebra::inverse(mass_matrix_a, mass_matrix_a_inv);
Algebra::symmetric_inverse(mass_matrix_a, mass_matrix_a_inv);
submit_profile_timing("");
// }
}
Expand All @@ -209,7 +209,7 @@ class MultiBodyConstraintSolver {
// is_positive_definite_b = true;
// } else {
submit_profile_timing("inverse_mass_matrix_b");
is_positive_definite_b = Algebra::inverse(mass_matrix_b, mass_matrix_b_inv);
is_positive_definite_b = Algebra::symmetric_inverse(mass_matrix_b, mass_matrix_b_inv);
submit_profile_timing("");
// }
}
Expand Down Expand Up @@ -474,4 +474,4 @@ static TINY_INLINE MultiBodyConstraintSolver<AlgebraTo> clone(
const MultiBodyConstraintSolver<AlgebraFrom>& s) {
return s.template clone<AlgebraTo>();
}
} // namespace tds
} // namespace tds
6 changes: 3 additions & 3 deletions src/multi_body.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class MultiBody {
conv.links_.push_back(link.template clone<AlgebraTo>());
}
conv.control_indices_ = control_indices_;
conv.visual_shape_ids_ = visual_shape_ids_;
conv.visual_shape_uids_ = visual_shape_uids_;
for (const auto &x : X_visuals_) {
conv.X_visuals_.push_back(x.template clone<AlgebraTo>());
}
Expand Down Expand Up @@ -212,8 +212,8 @@ class MultiBody {
return base_X_world_;
}

TINY_INLINE std::vector<int> &visual_shape_ids() { return visual_shape_ids_; }
TINY_INLINE const std::vector<int> &visual_shape_ids() const { return visual_shape_ids_; }
TINY_INLINE std::vector<int> &visual_shape_ids() { return visual_shape_uids_; }
TINY_INLINE const std::vector<int> &visual_shape_ids() const { return visual_shape_uids_; }

TINY_INLINE std::vector<int>& visual_instance_uids() { return visual_instance_uids_; }
TINY_INLINE const std::vector<int>& visual_instance_uids() const { return visual_instance_uids_; }
Expand Down
2 changes: 1 addition & 1 deletion third_party/bullet3

0 comments on commit a80bc19

Please sign in to comment.