@@ -543,7 +543,9 @@ PYBIND11_MODULE(_core, m) {
543543 std::vector<std::string> arm_collision_geoms,
544544 std::vector<std::string> joints,
545545 std::optional<rcs::common::VectorXd> q_home,
546- std::vector<std::string> actuators, std::string base,
546+ std::vector<std::string> actuators,
547+ std::optional<std::vector<double >> kp,
548+ std::optional<std::vector<double >> kv, std::string base,
547549 size_t dof,
548550 const Eigen::Matrix<double , 2 , Eigen::Dynamic,
549551 Eigen::ColMajor>& joint_limits) {
@@ -559,6 +561,8 @@ PYBIND11_MODULE(_core, m) {
559561 config.arm_collision_geoms = arm_collision_geoms;
560562 config.joints = joints;
561563 config.actuators = actuators;
564+ config.kp = kp;
565+ config.kv = kv;
562566 config.base = base;
563567 config.dof = dof;
564568 config.joint_limits = joint_limits;
@@ -580,6 +584,7 @@ PYBIND11_MODULE(_core, m) {
580584 py::arg (" joints" ) = default_simrobot_cfg.joints ,
581585 py::arg (" q_home" ) = default_simrobot_cfg.q_home ,
582586 py::arg (" actuators" ) = default_simrobot_cfg.actuators ,
587+ py::arg (" kp" ) = std::nullopt , py::arg (" kv" ) = std::nullopt ,
583588 py::arg (" base" ) = default_simrobot_cfg.base ,
584589 py::arg (" dof" ) = default_simrobot_cfg.dof ,
585590 py::arg (" joint_limits" ) = default_simrobot_cfg.joint_limits )
@@ -594,6 +599,12 @@ PYBIND11_MODULE(_core, m) {
594599 &rcs::sim::SimRobotConfig::arm_collision_geoms)
595600 .def_readwrite (" joints" , &rcs::sim::SimRobotConfig::joints)
596601 .def_readwrite (" actuators" , &rcs::sim::SimRobotConfig::actuators)
602+ .def_readwrite (
603+ " kp" , &rcs::sim::SimRobotConfig::kp,
604+ " Per-joint position gains; None uses the MuJoCo XML values" )
605+ .def_readwrite (
606+ " kv" , &rcs::sim::SimRobotConfig::kv,
607+ " Per-joint velocity gains; None uses the MuJoCo XML values" )
597608 .def_readwrite (" base" , &rcs::sim::SimRobotConfig::base)
598609 .def_readwrite (" dof" , &rcs::sim::SimRobotConfig::dof)
599610 .def_readwrite (" joint_limits" , &rcs::sim::SimRobotConfig::joint_limits)
0 commit comments