RyuYamamoto / PreviewControl

0 stars 0 forks source link

What robot are you using ? #1

Open ktiwari9 opened 9 years ago

ktiwari9 commented 9 years ago

Hi there, What robot are you using ? If this is a humanoid robot, can you guide me how to write a matlab code to control the pan/tilt motion of its head in VRep ?

RyuYamamoto commented 9 years ago

Hi.

This code is a program that I wrote for the humanoid robot that competed in the Robocup Humanoid League.

youtube

If you simply move the joint of head , the following URL of the program I think that may be appreciated by reference to .

https://github.com/RyuYamamoto/PreviewControl/blob/master/RSMove.m

Is it possible to get me the model of the details that you are going to move ?

ktiwari9 commented 9 years ago

I would be using a Hoap 3 ( http://home.comcast.net/~jtechsc/). It is simple humanoid robot by Fujitsu. I want to visualise a Hoap 3 in Vrep and then have a matlab script to command the hoap 3 to pan-tilt its head.

ktiwari9 commented 9 years ago

What I still dont know is how to visualise a Hoap-3 in Vrep and how to write the matlab code to make it move the head only.

RyuYamamoto commented 9 years ago

I added a sample program below: https://github.com/RyuYamamoto/V-REP_RemoteAPI/blob/master/test/sample_head_motion.m

If you simply move the joint , I think whether become the reference .

If the intention is different , you are requested to comment .

ktiwari9 commented 9 years ago

Hi,I am sorry but what do you mean by "If you simply move the joint , I think whether become the reference " ?Also, do you know how I can visualise a HOAP-3 in VREP ? It is not present in the VREP so I tried importing the URDF file but it doesnt work. I have the URDF file if you need it.Please help. 

ktiwari9 commented 9 years ago

I also get this error while compiling the code : Error using remApi (line 587) Not enough input arguments.

Error in sample_head_motion (line 10) vrep=remApi('remoteApi');

Any idea how to fix this ?

RyuYamamoto commented 9 years ago

sample_head_motion.m and remoteApi.m located on the same directory?

remoteApi.m is located in the folder of V-REP you've downloaded .

ktiwari9 commented 9 years ago

yes I am working in the directory C:\Program Files (x86)\V-REP3\V-REP_PRO_EDU\programming\remoteApiBindings\matlab\matlab Both the sample_head_motion.m and remoteApi.m are in the same directory

ktiwari9 commented 9 years ago

Also, in the sample_head_motion.m file, Lines 19-20, [err1]=vrep.simxSetJointTargetPosition(clientID,HipR_JointA0,-target_value,vrep.simx_opmode_oneshot); [err2]=vrep.simxSetJointTargetPosition(clientID,KneeR_JointA0,-target_value,vrep.simx_opmode_oneshot);

What is HipR_JointA0 and -target_value ? Is HipR_JointA0="pan joint name" from Line 14 and target_value = angle of pan rotation ?

RyuYamamoto commented 9 years ago

Sorry,I did not rewrite...

I was fixed,please refer to the following again:https://github.com/RyuYamamoto/V-REP_RemoteAPI/blob/master/test/sample_head_motion.m

ktiwari9 commented 9 years ago

Aah okay. Thanks now I understand. But I still have the error with remoteApi. If we can fix this, I can make the code work with Vrep.

RyuYamamoto commented 9 years ago

What do you use version of V-REP_PRO_EDU?

ktiwari9 commented 9 years ago

I use V-REP PRO EDU V3.2.1. Should I use another Version ?

RyuYamamoto commented 9 years ago

I don’t know because I have not tried,my environment is certainly 3.1.2 .

I think that it really does not matter...

ktiwari9 commented 9 years ago

I think I managed to fix that error but now the problem is this code does not do anything in VREP. I do not see any head movements for the hoap-3 in VREP.