diff --git a/src/examples/vx300.cpp b/src/examples/vx300.cpp new file mode 100644 index 00000000..0c158567 --- /dev/null +++ b/src/examples/vx300.cpp @@ -0,0 +1,39 @@ +#include +#include +#include + +#ifdef GRAPHIC +#include +#endif + +int main() +{ + auto robot = std::make_shared(); + robot->set_actuator_types("servo"); + + Eigen::VectorXd ctrl = robot_dart::make_vector({0.0, 1.0, -1.5, 1.0, 0.5, 0.}); + + auto controller = std::make_shared(ctrl); + robot->add_controller(controller); + + robot_dart::RobotDARTSimu simu; + simu.set_collision_detector("fcl"); +#ifdef GRAPHIC + simu.set_graphics(std::make_shared()); +#endif + simu.add_robot(robot); + simu.add_checkerboard_floor(); + + for (auto& n : robot->dof_names()) { + std::cout << n << std::endl; + } + + simu.run(2.5); + + ctrl << 0.0, -0.5, 0.5, -0.5, 0., 1.; + controller->set_parameters(ctrl); + controller->set_pd(20., 0.); + simu.run(2.5); + + return 0; +} diff --git a/src/python/robot.cpp b/src/python/robot.cpp index 33f1f65c..a25a6083 100644 --- a/src/python/robot.cpp +++ b/src/python/robot.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -598,6 +599,11 @@ namespace robot_dart { py::arg("frequency") = 1000, py::arg("urdf") = "ur3e/ur3e_with_schunk_hand.urdf", py::arg("packages") = std::vector>({{"ur3e_description", "ur3e/ur3e_description"}})); + + py::class_>(m, "Vx300") + .def(py::init>&>(), + py::arg("urdf") = "vx300/vx300.urdf", + py::arg("packages") = std::vector>({{"interbotix_xsarm_descriptions", "vx300"}})); } } // namespace python } // namespace robot_dart diff --git a/src/robot_dart/robots/vx300.hpp b/src/robot_dart/robots/vx300.hpp new file mode 100644 index 00000000..0b427de5 --- /dev/null +++ b/src/robot_dart/robots/vx300.hpp @@ -0,0 +1,19 @@ +#ifndef ROBOT_DART_ROBOTS_VX300_HPP +#define ROBOT_DART_ROBOTS_VX300_HPP + +#include "robot_dart/robot.hpp" + +namespace robot_dart { + namespace robots { + class Vx300 : public Robot { + public: + Vx300(const std::string& urdf = "vx300/vx300.urdf", const std::vector>& packages = {{"interbotix_xsarm_descriptions", "vx300"}}) : Robot(urdf, packages) + { + fix_to_world(); + set_position_enforced(true); + set_color_mode("aspect"); + } + }; + } // namespace robots +} // namespace robot_dart +#endif diff --git a/utheque/vx300/vx300.urdf b/utheque/vx300/vx300.urdf new file mode 100644 index 00000000..6d7325f7 --- /dev/null +++ b/utheque/vx300/vx300.urdf @@ -0,0 +1,322 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/utheque/vx300/vx300_meshes/vx300_10_ar_tag.stl b/utheque/vx300/vx300_meshes/vx300_10_ar_tag.stl new file mode 100644 index 00000000..193014b6 Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_10_ar_tag.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_1_base.stl b/utheque/vx300/vx300_meshes/vx300_1_base.stl new file mode 100644 index 00000000..5a7efda2 Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_1_base.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_2_shoulder.stl b/utheque/vx300/vx300_meshes/vx300_2_shoulder.stl new file mode 100644 index 00000000..dc22aa7e Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_2_shoulder.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_3_upper_arm.stl b/utheque/vx300/vx300_meshes/vx300_3_upper_arm.stl new file mode 100644 index 00000000..111c586e Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_3_upper_arm.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_4_forearm.stl b/utheque/vx300/vx300_meshes/vx300_4_forearm.stl new file mode 100644 index 00000000..cbdc35cf Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_4_forearm.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_5_wrist.stl b/utheque/vx300/vx300_meshes/vx300_5_wrist.stl new file mode 100644 index 00000000..ab8423e9 Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_5_wrist.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_6_gripper.stl b/utheque/vx300/vx300_meshes/vx300_6_gripper.stl new file mode 100644 index 00000000..043db9ca Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_6_gripper.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_7_gripper_prop.stl b/utheque/vx300/vx300_meshes/vx300_7_gripper_prop.stl new file mode 100644 index 00000000..36099b42 Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_7_gripper_prop.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_8_gripper_bar.stl b/utheque/vx300/vx300_meshes/vx300_8_gripper_bar.stl new file mode 100644 index 00000000..eba3caa2 Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_8_gripper_bar.stl differ diff --git a/utheque/vx300/vx300_meshes/vx300_9_gripper_finger.stl b/utheque/vx300/vx300_meshes/vx300_9_gripper_finger.stl new file mode 100644 index 00000000..d6df86be Binary files /dev/null and b/utheque/vx300/vx300_meshes/vx300_9_gripper_finger.stl differ