Hi!
Thanks for the repo, I like the idea of having an unified place for this. :)
I have a question about the design choice the MujocoRosControl class.
Why are you not just creating a HardwareInterface like in cartesian_controllers ?
In your code, you implement a class that instantiates a pointer to the control manager instead of just creating a HardwareInterface that runs mujoco in an infinite while loop. This makes the launch files look a bit odd, since they do not use the controller_manager as default. (I am referencing the code down here).
|
mjModel *mj_model_; |
|
mjData *mj_data_; |
|
|
|
rclcpp::Logger logger_; |
|
std::shared_ptr<pluginlib::ClassLoader<MujocoSystemInterface>> robot_hw_sim_loader_; |
|
|
|
std::shared_ptr<controller_manager::ControllerManager> controller_manager_; |
|
rclcpp::Executor::SharedPtr cm_executor_; |
|
std::thread cm_thread_; |
|
bool stop_cm_thread_; |
|
rclcpp::Duration control_period_; |
Is there a reason for this? I have been using a modified version of cartesian_controllers (since it has some mistakes, see Issue 217) and it has been working perfectly without modifying the controller manager.
Thanks in advance for the clarification.
Dani
Hi!
Thanks for the repo, I like the idea of having an unified place for this. :)
I have a question about the design choice the
MujocoRosControlclass.Why are you not just creating a
HardwareInterfacelike in cartesian_controllers ?In your code, you implement a class that instantiates a pointer to the control manager instead of just creating a
HardwareInterfacethat runs mujoco in an infinite while loop. This makes the launch files look a bit odd, since they do not use thecontroller_manageras default. (I am referencing the code down here).mujoco_ros2_control/mujoco_ros2_control/include/mujoco_ros2_control/mujoco_ros2_control.hpp
Lines 50 to 60 in 9e82f24
Is there a reason for this? I have been using a modified version of cartesian_controllers (since it has some mistakes, see Issue 217) and it has been working perfectly without modifying the controller manager.
Thanks in advance for the clarification.
Dani