-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New abstract class DQ_CoppeliaSimInterface #112
Draft
juanjqo
wants to merge
17
commits into
dqrobotics:master
Choose a base branch
from
juanjqo:new_interface
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,848
−1,356
Draft
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
6589352
Added a draft of the new abstract class for coppeliasim
juanjqo f26060b
Added the DQ_CoppeliaSimInterface abstract class
juanjqo f545f8d
Merge branch 'dqrobotics:master' into new_interface
juanjqo de12e6f
Merge branch 'new_interface' of https://github.com/juanjqo/matlab int…
juanjqo 4cbc4ac
[DQ_CoppeliaSimInterface.m] Fixed signature of stepping_mode method
juanjqo 29e3aac
[DQ_VrepInterface] The class now a concrete class of the abstract cla…
juanjqo 24b40ca
Added the new class DQ_CoppeliaSimLegacyInterface
juanjqo 45e35b6
[DQ_VrepInterface] renamed the class to DQ_CoppeliaSimLegacyInterface…
juanjqo 9fc718d
Added a new folder to organize better the new classes that use Coppel…
juanjqo 47918cb
Added a new folder to organize better the new classes that use Coppel…
juanjqo 53c21da
[DQ_VrepInterface] Added a deprecation warning, as suggested by Frede…
juanjqo 718a9cb
[DQ_VrepRobot, DQ_CoppeliaSimRobot] Renamed the class and added backw…
juanjqo fd2aa4e
[DQ_SerialVrepRobot] fixed the constructor signature.
juanjqo e457e12
renamed the class DQ_SerialVrepRobot to DQ_SerialCoppeliaSimRobot.
juanjqo 417b075
[DQ_SerialCoppeliaSimRobot] Updated the contributions.
juanjqo 2d7ba87
Renamed the robots based on Vrep to use CoppeliaSim. Added backward c…
juanjqo c1e8d16
[YouBotVrepRobot.m] Added a deprecation warning message.
juanjqo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
% (C) Copyright 2024 DQ Robotics Developers | ||
% | ||
% This file is part of DQ Robotics. | ||
% | ||
% DQ Robotics is free software: you can redistribute it and/or modify | ||
% it under the terms of the GNU Lesser General Public License as published by | ||
% the Free Software Foundation, either version 3 of the License, or | ||
% (at your option) any later version. | ||
% | ||
% DQ Robotics is distributed in the hope that it will be useful, | ||
% but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
% GNU Lesser General Public License for more details. | ||
% | ||
% You should have received a copy of the GNU Lesser General Public License | ||
% along with DQ Robotics. If not, see <http://www.gnu.org/licenses/>. | ||
% | ||
% DQ Robotics website: dqrobotics.github.io | ||
% | ||
% Contributors to this file: | ||
% | ||
% 1. Juan Jose Quiroz Omana (juanjose.quirozomana@manchester.ac.uk) | ||
% - Responsible for the original implementation. | ||
|
||
classdef (Abstract) DQ_CoppeliaSimInterface < handle | ||
|
||
properties (Access = protected) | ||
end | ||
|
||
methods (Access = protected) | ||
% function obj = DQ_CoppeliaSim(inputArg1,inputArg2) | ||
% end | ||
end | ||
|
||
methods(Abstract) | ||
% This method connects to CoppeliaSim. | ||
% Calling this function is required before anything else can happen. | ||
connect(obj, host, port, TIMEOUT_IN_MILISECONDS); | ||
|
||
% This method enables or disables the stepped (synchronous) mode | ||
% for the remote API server service that the client is connected to. | ||
% Example: | ||
% set_stepping_mode(true) % stepping mode enabled | ||
% set_stepping_mode(false) % stepping mode disabled | ||
set_stepping_mode(obj, flag); | ||
|
||
% This method sends trigger signal to the CoppeliaSim scene, | ||
% which performs a simulation step when the stepping mode is used. | ||
trigger_next_simulation_step(obj); | ||
|
||
% This method starts the CoppeliaSim simulation. | ||
start_simulation(obj); | ||
|
||
% This method stops the CoppeliaSim simulation. | ||
stop_simulation(obj); | ||
|
||
% This method gets the handles for a cell array of | ||
% object names in the the CoppeliaSim scene. | ||
handles = get_handles(obj,names); | ||
|
||
% This method gets the handle for a given object in the CoppeliaSim scene. | ||
handle = get_handle(obj,name); | ||
|
||
% This method gets the translation of an object in the CoppeliaSim scene. | ||
t = get_object_translation(obj,objectname); | ||
|
||
% This method sets the translation of an object in the CoppeliaSim scene. | ||
set_object_translation(obj,objectname,translation); | ||
|
||
% This method gets the rotation of an object in the CoppeliaSim scene. | ||
r = get_object_rotation(obj, objectname); | ||
|
||
% This method sets the rotation of an object in the CoppeliaSim scene. | ||
set_object_rotation(obj,objectname,rotation); | ||
|
||
% This method gets the pose of an object in the CoppeliaSim scene. | ||
x = get_object_pose(obj,objectname); | ||
|
||
% This method sets the pose of an object in the CoppeliaSim scene. | ||
set_object_pose(obj,objectname,pose); | ||
|
||
% This method sets the joint positions of a robot in the CoppeliaSim scene. | ||
set_joint_positions(obj,jointnames,joint_positions); | ||
|
||
% This method sets the joint positions of a robot in the CoppeliaSim scene. | ||
joint_positions = get_joint_positions(obj,jointnames); | ||
|
||
% This method sets the joint target positions of a robot in the CoppeliaSim scene. | ||
% It is required a dynamics enabled scene, and joints in dynamic mode | ||
% with position control mode. | ||
% information about joint modes: | ||
% https://www.coppeliarobotics.com/helpFiles/en/jointModes.htm | ||
set_joint_target_positions(obj,jointnames,joint_target_positions); | ||
|
||
% This method gets the joint velocities of a robot in the CoppeliaSim scene. | ||
joint_velocities = get_joint_velocities(obj,jointnames); | ||
|
||
% This method sets the joint target velocities of a robot in the CoppeliaSim scene. | ||
% It is required a dynamics enabled scene, and joints in dynamic mode | ||
% with velocity control mode. Check this link for more | ||
% information about joint modes: | ||
% https://www.coppeliarobotics.com/helpFiles/en/jointModes.htm | ||
set_joint_target_velocities(obj,jointnames,joint_target_velocities); | ||
|
||
% This method sets the joint torques of a robot in the CoppeliaSim scene. | ||
% It is required a dynamics enabled scene, and joints in dynamic mode | ||
% with velocity or force/torque control mode. Check this link for more | ||
% information about joint modes: | ||
% https://www.coppeliarobotics.com/helpFiles/en/jointModes.htm | ||
set_joint_torques(obj,jointnames,torques); | ||
|
||
% This method gets the joint torques of a robot in the CoppeliaSim scene. | ||
joint_torques = get_joint_torques(obj,jointnames); | ||
end | ||
end | ||
|
||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remember to add the methods
get_center_of_mass()
,get_mass()
, andget_inertia_matrix()
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ffasilva, thank you for the reminder.
Note for the future Juancho (since I am going to completely forget this): we discussed this internally. We decided to add those methods in a future PR since they are not available in the master version of the DQ Robotics. We are still working on it at #109