Hello,
I am currently trying to implement a complex controller in simulink / matlab with many inputs and outputs and then have this controller update coppelia simulation with torques and velocities for different joints on a continuous basis.
My main question is, will my simulation be able to update itself quickly enough using this method? Or will the communication between Matlab and Vrep be too slow to handle this?
I am aware of the joint control callback scripts, but implementing my controller in coppelia is not desirable and I do not want to do it unless it is absolutely necessary.
Thanks!
Communication Speed - MATLAB to CoppeliaSim
Re: Communication Speed - MATLAB to CoppeliaSim
Hello,
so what you are trying to do is very similar to the following demo scene: scenes/pControllerViaRemoteApi.ttt. Load that scene, then run via Python one of the two remote APi clients:
Cheers
so what you are trying to do is very similar to the following demo scene: scenes/pControllerViaRemoteApi.ttt. Load that scene, then run via Python one of the two remote APi clients:
- with the B0-based remote API: programming/b0RemoteApiBindings/python/pController.py
- with the legacy remote API: programming/remoteApiBindings/python/python/pyController.py
Cheers
Re: Communication Speed - MATLAB to CoppeliaSim
Hello,
Thanks for the swift reply! I have only been using CoppeliaSim for a couple of weeks now so excuse my ignorance. I looked over the demo and it was quite helpful.
I have another question regarding the introduction of force (thrust) into the simulation in the direction that is perpendicular to my drone propellers. Is there a way to link the propeller rotation speed with a force? I have values for what forces correspond to what propeller speeds, but I was wondering if it this conversion is best done in MATLAB or if there is a way to do it directly in CoppeliaSim by introducing a lookup chart or something like that?
Assuming that I am able to do this, will the model be able to "feel" the gyroscopic effects of the model if this propeller is being moved by the robot? The propeller is at the end of a moving arm, and moving the arm while the propeller is rotating obviously involves many gyroscopic forces, but would these be apparent in the simulation?
Thanks!
Thanks for the swift reply! I have only been using CoppeliaSim for a couple of weeks now so excuse my ignorance. I looked over the demo and it was quite helpful.
I have another question regarding the introduction of force (thrust) into the simulation in the direction that is perpendicular to my drone propellers. Is there a way to link the propeller rotation speed with a force? I have values for what forces correspond to what propeller speeds, but I was wondering if it this conversion is best done in MATLAB or if there is a way to do it directly in CoppeliaSim by introducing a lookup chart or something like that?
Assuming that I am able to do this, will the model be able to "feel" the gyroscopic effects of the model if this propeller is being moved by the robot? The propeller is at the end of a moving arm, and moving the arm while the propeller is rotating obviously involves many gyroscopic forces, but would these be apparent in the simulation?
Thanks!
Re: Communication Speed - MATLAB to CoppeliaSim
From our experience, physics engines have difficulties handling high rotation speeds accurately. High means something larger than 2-5 rotations per second. But you are free to try the response the various physics engine will give you.
In case of a quadcopter or similar, only thrust forces are applied and the propeller rotation is just for visuals.
Cheers
In case of a quadcopter or similar, only thrust forces are applied and the propeller rotation is just for visuals.
Cheers