jrl-umi3218 / mc_rtc

mc_rtc is an interface for simulated and real robotic systems suitable for real-time control
BSD 2-Clause "Simplified" License
122 stars 37 forks source link

Adding Torque Task #458

Open Taherifar opened 2 months ago

Taherifar commented 2 months ago

Hi @gergondet, @arntanguy, @mmurooka, @antodld, I would like to add a torque task to mc_rtc to be able to minimise the torque consumption in the robot joints. My robot is a legged robot similar to JVRC and I am using a stabilizer. I have realised that the torque task is part of the Task library, but is not implemented in mc_rtc. Thus, I have tried to create torqueTask.cpp and torqueTask.h and add it to mc_tasks folder in mc_rtc. I have attached my code here (TorqueTask.zip). I have also added those files to CMakeLists.txt to be able to compile. There are still some issue with the compilation of the code, but I was just going to share this and make sure that I am on the right path. 1- Given my initial goal to minimize the torques, is this a right decision to use the Tasks/QPTasks.h class from Task library and add it to the mc_rtc? 2- Do you see any major issue with the .cpp and .h files that I have attached? 3- Do I need to add contact as suggested in this tutorial, in order for the torque task be effective? Thanks

Taherifar commented 1 month ago

Hi @gergondet, @arntanguy, @mmurooka, @antodld I just wanted to follow up on this and upload my latest version of the McTorqueTask.zip code here. I have tried to register the task on McTorqueTask.cpp, but still need to include the McTorqueTask.h in my controller. Thus, to add on the previous question, how could we properly register a task in mc_rtc.