diff --git a/examples/laikago_opengl_example.cpp b/examples/laikago_opengl_example.cpp index 801eef85..7718f156 100644 --- a/examples/laikago_opengl_example.cpp +++ b/examples/laikago_opengl_example.cpp @@ -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(); diff --git a/examples/tiny_urdf_parser_opengl_example.cpp b/examples/tiny_urdf_parser_opengl_example.cpp index d2c98c6c..5271b30c 100644 --- a/examples/tiny_urdf_parser_opengl_example.cpp +++ b/examples/tiny_urdf_parser_opengl_example.cpp @@ -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 visual_instances; std::vector num_instances; int num_base_instances; diff --git a/examples/tiny_visual_instance_generator.h b/examples/tiny_visual_instance_generator.h index 7bb28944..edc3c681 100644 --- a/examples/tiny_visual_instance_generator.h +++ b/examples/tiny_visual_instance_generator.h @@ -14,7 +14,7 @@ struct TinyVisualInstanceGenerator : public VisualInstanceGenerator } virtual void create_visual_instance(int shape_uid, std::vector& visual_instances ) { - OpenGLUrdfVisualizer::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]; @@ -31,4 +31,4 @@ struct TinyVisualInstanceGenerator : public VisualInstanceGenerator } }; -#endif \ No newline at end of file +#endif diff --git a/src/link.hpp b/src/link.hpp index 979c04fd..e8949d5e 100644 --- a/src/link.hpp +++ b/src/link.hpp @@ -93,7 +93,7 @@ struct Link { conv.link_name = link_name; conv.joint_name = joint_name; conv.f_ext = tds::clone(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()); } diff --git a/src/math/eigen_algebra.hpp b/src/math/eigen_algebra.hpp index 0ace8e50..f40913a2 100644 --- a/src/math/eigen_algebra.hpp +++ b/src/math/eigen_algebra.hpp @@ -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()); @@ -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; } diff --git a/src/mb_constraint_solver.hpp b/src/mb_constraint_solver.hpp index 59070b8c..a7b83df0 100644 --- a/src/mb_constraint_solver.hpp +++ b/src/mb_constraint_solver.hpp @@ -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(""); // } } @@ -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(""); // } } @@ -474,4 +474,4 @@ static TINY_INLINE MultiBodyConstraintSolver clone( const MultiBodyConstraintSolver& s) { return s.template clone(); } -} // namespace tds \ No newline at end of file +} // namespace tds diff --git a/src/multi_body.hpp b/src/multi_body.hpp index b0e76902..91cefb71 100644 --- a/src/multi_body.hpp +++ b/src/multi_body.hpp @@ -94,7 +94,7 @@ class MultiBody { conv.links_.push_back(link.template clone()); } 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()); } @@ -212,8 +212,8 @@ class MultiBody { return base_X_world_; } - TINY_INLINE std::vector &visual_shape_ids() { return visual_shape_ids_; } - TINY_INLINE const std::vector &visual_shape_ids() const { return visual_shape_ids_; } + TINY_INLINE std::vector &visual_shape_ids() { return visual_shape_uids_; } + TINY_INLINE const std::vector &visual_shape_ids() const { return visual_shape_uids_; } TINY_INLINE std::vector& visual_instance_uids() { return visual_instance_uids_; } TINY_INLINE const std::vector& visual_instance_uids() const { return visual_instance_uids_; } diff --git a/third_party/bullet3 b/third_party/bullet3 index ef72fdd7..7f87bb53 160000 --- a/third_party/bullet3 +++ b/third_party/bullet3 @@ -1 +1 @@ -Subproject commit ef72fdd73d5d7f196ba40e2aa01c991decd31f27 +Subproject commit 7f87bb5362bf5674046e0f6c27dd6f7906e4d999