New abstract class DQ_CoppeliaSimInterface#112
New abstract class DQ_CoppeliaSimInterface#112juanjqo wants to merge 17 commits intodqrobotics:masterfrom
Conversation
…o new_interface
…ss DQ_CoppeliaSimInterface
…. The class DQ_VrepInterface still exits to keep backward compatibility.
|
Hi @juanjqo, I don't see the problem with your first suggestion. A user trying to use As a suggestion, I would only modify % For backward compatibility only. Do not use this class.
classdef DQ_VrepInterface < DQ_CoppeliaSimLegacyInterface
methods
function obj = DQ_VrepInterface()
warning('Deprecated. Use DQ_CoppeliaSimLegacyInterface instead.')
obj@DQ_CoppeliaSimLegacyInterface();
end
end
end
Additionally, I believe the abstract class Kind regards, |
|
@ffasilva thanks, I'm going to include the modifications you suggested. |
…ard compatibility.
|
Hi @juanjqo could you please clarify who do you want to review this code and in what order. |
|
@mmmarinho I don't have any specific preference. May I suggest the following order @ffasilva, @mmmarinho, and @bvadorno? |
Sounds good to me. Please proceed. Kind regards, |
ffasilva
left a comment
There was a problem hiding this comment.
Hi @juanjqo,
Thank you for the pull request. I tested the classes and found no problems with them. I just added two minor comments.
The one regarding the inclusion of the methods get_center_of_mass(), get_mass(), and get_inertia_matrix() is pending on #109. I'll work on this now.
Kind regards,
Frederico
|
|
||
| % This method gets the joint torques of a robot in the CoppeliaSim scene. | ||
| joint_torques = get_joint_torques(obj,jointnames); | ||
| end |
There was a problem hiding this comment.
Please remember to add the methods get_center_of_mass(), get_mass(), and get_inertia_matrix().
There was a problem hiding this comment.
| effector = 1 + E_*0.5*0.3*k_; | ||
| kin.set_effector(effector); | ||
| end | ||
| obj@YouBotCoppeliaSimRobot(robot_name, vrep_interface); |
There was a problem hiding this comment.
Please add a warning message informing that the class is now deprecated:
warning('Deprecated. Use YouBotCoppeliaSimRobot instead.')There was a problem hiding this comment.
@ffasilva good catch! I added the warning message.
There was a problem hiding this comment.
@ffasilva I added the modifications you suggested. Please let me know if something else is required.
|
Hi @juanjqo, Thank you! I believe we're good to go. Do you have any comments on this PR, @mmmarinho? Kind regards, |
@juanjqo, could you please use one of your computers (maybe the latest unmanaged one I gave you a couple of weeks ago) to set up CoppeliaSim-enabled examples in GitHub actions? Thanks, |
|
@bvadorno Sure, I am going to check if it is possible. Best regards, |
|
This PR is deprecated, considering the following remarks:
Kind regards, Juancho |
Description of changes
Hi @dqrobotics/developers
This PR
aims to discuss strategies to implement aproposes an abstract classDQ_CoppeliaSimInterface. The idea is to have concrete classes with different Coppelia's API. For instance, the Legacy remote API (the one used by DQ Robotics, but currently deprecated), and the ZeroMQ remote API. This feature was internally discussed, and I am working on a prototype based on my own DQ Robotics zmq-based interface.This PR proposes the following:
DQ_CoppeliaSimInterfaceDQ_VrepInterfacetoDQ_CoppeliaSimLegacyInterface, and now, this class inherits fromDQ_CoppeliaSimInterfaceDQ_VrepInterface, which inherits fromDQ_CoppeliaSimLegacyInterfacefor backward compatibility.I implemented a similar strategy concerning the following classes:
I'm planning to include the methods
get_center_of_mass(),get_mass(), andget_inertia_matrix()(as suggested by @ffasilva) in the abstract class DQ_CoppeliaSimInterface() in future PRs since we are still working on them.Best regards,
Juancho
Is this the best strategy? Please let me know your suggestions.Alternatively, we could have the same behavior with fewer modifications in this way:The currentDQ_VrepInterface()class inherits form DQ_CoppeliaSimInterfaceTheDQ_CoppeliaSimLegacyInterface()class inherits fromDQ_VrepInterface(). Therefore, no renaming is required.PS@bvadorno mentioned specific Matlab tools for managing aliases. But, I am not sure if this is available for C++/Python.