Hello,
Im newbie in vrep and i want your help. I want to make the pioneer_p3dx robot go to a point for an example a dummy which i want to name it "end". I am using matlab to control the robot. Should I code it from matlab or from a child script? How can i do that?
Thanks in advance,
Karabill
go to dummy(?) vrep+matlab
Re: go to dummy(?) vrep+matlab
Hello,
the best would be to first do everything in V-REP, via child scripts. Then you can also quickly say what is going wrong.
Also, it really depends if you need path planning functionality. If yes, then I definitely recommend you to do everything from child scripts, and only have Matlab trigger the path planning or motion operations.
Cheers
the best would be to first do everything in V-REP, via child scripts. Then you can also quickly say what is going wrong.
Also, it really depends if you need path planning functionality. If yes, then I definitely recommend you to do everything from child scripts, and only have Matlab trigger the path planning or motion operations.
Cheers
Re: go to dummy(?) vrep+matlab
Thanks for your answer. So I have to delete the previous script on pioneer_p3dx and write a new one ?? Also, when you say to trigger the robot from matlab, what do you mean ? To start moving the robot and the rest program to run via vrep?coppelia wrote:Hello,
the best would be to first do everything in V-REP, via child scripts. Then you can also quickly say what is going wrong.
Also, it really depends if you need path planning functionality. If yes, then I definitely recommend you to do everything from child scripts, and only have Matlab trigger the path planning or motion operations.
Cheers
Thanks in advance,
Karabill
Re: go to dummy(?) vrep+matlab
Yes, you will have to replace the existing code for the Pioneer robot with your low-level control. And do only the high-level control from Matlab (e.g. send from Matlab the desired target position for the robot to reach. Then, on the V-REP side, handle the motion of the motors in order to reach that desired target position)
Cheers
Cheers
Re: go to dummy(?) vrep+matlab
Hi again, I really cant find the command to set the target position. I find only this simxSetJointTargetPosition but it isn't the right one.coppelia wrote:Yes, you will have to replace the existing code for the Pioneer robot with your low-level control. And do only the high-level control from Matlab (e.g. send from Matlab the desired target position for the robot to reach. Then, on the V-REP side, handle the motion of the motors in order to reach that desired target position)
Cheers
Re: go to dummy(?) vrep+matlab
Same here, how do you set the target position?karabill wrote: Hi again, I really cant find the command to set the target position. I find only this simxSetJointTargetPosition but it isn't the right one.
Re: go to dummy(?) vrep+matlab
There is no command to set the target position of the robot. V-REP is a robotics toolbox, and you'll have to program things yourself. There is no such command as Robot, go to position X/Y, because that will depend on the type of robot, the type of algorithm , etc. The robot could have two wheels, 3 wheels, 1 sphere, 4 wheels, etc. The way to control all those robots will be different. Also, you could have your algorithm drive the robot directly to the X/Y position, or you could have the algorithm drive to the X/Y position by avoiding obstacles, or by driving backwards, etc.
So for all those variables, you have algorithms that will deal with your problem. But you will have to write that algorithm for the robot to move, and you will have to tell the algorithm what robot and movement it has to deal with.
Once your algorithm is written, it will take some input (e.g. the current robot position and the desired target position), and generate some outputs over time (i.e. the left and right wheel motor velocity to apply).
Cheers
So for all those variables, you have algorithms that will deal with your problem. But you will have to write that algorithm for the robot to move, and you will have to tell the algorithm what robot and movement it has to deal with.
Once your algorithm is written, it will take some input (e.g. the current robot position and the desired target position), and generate some outputs over time (i.e. the left and right wheel motor velocity to apply).
Cheers