-
here is my code yarp.Network.fini()
RightArm=yarp.Port()
RightArm.open('/python/RightArm')
yarp.Network.connect('/icubSim/right_arm','/python/RightArm')
prepare a property object
armOptions = yarp.Property()
armOptions.put('device','remote_controlboard')
armOptions.put('local','/client/right_arm')
armOptions.put('remote','/icubSim/right_arm')
create remote driver
armDriver = yarp.PolyDriver(armOptions)
#query motor control interfacesarmPos = armDriver.viewIPositionControl()
armPos = armDriver.viewIPositionControl()
armEncs = armDriver.viewIEncoders()
retrieve the number of joints
jntsArm=armPos.getAxes()
tmp=yarp.Vector(jntsArm)
a=[180, 10, 0, 10, 60, 40, 0, 40, 0, 0, 0, 0, 0, 0, 0, 0, 90]
for i in range(0,17):
sigma=15.0
xrange=np.arange(0, 300, 50)
center=(tmp.get(i)+a[i])
tmp.set(i, center)
gaussianResp=gaussian1D_bank(center,sigma,xrange)
inport.read(bottle)
print("Received ", bottle.toString())
yarp.delay(5) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 8 replies
-
Hi @ArfnZl Given that we don't provide this feature with our official Gazebo-based simulator yet, although there's already some ongoing work, I'd assume you're referring to our old Therefore, please peruse this documentation: You'll be able to come up with a bunch of data provided through YARP ports1, which conveys the information about contacts happening at the hand skin taxels. Try this out first. Then, we can provide you with further information about the mapping. Footnotes
|
Beta Was this translation helpful? Give feedback.
-
hello sir i am already using toch sensors in my thesis its only giving values 0 and 255..i want to take values of pressure sensores when i cub hand is grasped of different objects..i am using this code of pressure sensors import yarp define portssensor = yarp.Port() |
Beta Was this translation helpful? Give feedback.
Hi @ArfnZl
Given that we don't provide this feature with our official Gazebo-based simulator yet, although there's already some ongoing work, I'd assume you're referring to our old
iCub_SIM
.Therefore, please peruse this documentation:
You'll be able to come up with a bunch of data provided through YARP ports1, which conveys the information about contacts happening at the hand skin taxels.
Try this out first. Then, we can provide you with further information about the mapping.
Footnotes
You can find some examples of how to retrieve data in Python from YARP ports at https://github.com/robotology/yarp/tree/master/bindings/python/…