Error while opening the remote_controlboard of the icubSim head #463
-
Hi World, I installed ICUB and yarp from the platform of robotology. I run the code and it's work. But one of mine friend did the same process as given in Robotology and run the code. But he is getting error . Kindly have a look and guide me how to solve it. Code: function gazeShift_iCub()
[objcoorPort,objs,portLeft,portRight,headDriver,headPos,headEncs]=yarpInit();
%% Initialization
stepSize=1;
allowedPans=[-20:stepSize:+20];
allowedTilts=[-12:stepSize:+12];
headcentPans=[-20:0.1:+20];
headcentTilts=[-12:0.1:+12];
for k=1:length(allowedPans)
for l=1:length(allowedTilts)
panVal=allowedPans(randi(length(allowedPans)));
tiltVal=allowedTilts(randi(length(allowedTilts)));
headPos.positionMove(4,panVal); % Joint 4 both Eyes pan/version
headPos.positionMove(3,tiltVal); % Joint 3 both Eyes tilt
pause(60);
headPos.positionMove(4,0); % Joint 4 both Eyes pan/version
headPos.positionMove(3,0); % Joint 3 both Eyes tilt
pause(3);
end
end
%% Functions
function [objcoorPort,objs,portLeft,portRight,headDriver,headPos,headEncs]=yarpInit()
yarp.matlab.LoadYarp;
import yarp.Port;
import yarp.Bottle;
import yarp.BufferedPortImageRgb
import yarp.BufferedPortBottle;
portLeft=BufferedPortImageRgb;
portRight=BufferedPortImageRgb;
portLeft.open('/matlab/LeftEye');
yarp.Network.connect('/icubSim/cam/left/fovea','/matlab/LeftEye');
portRight.open('/matlab/RightEye');
yarp.Network.connect('/icubSim/cam/right/fovea','/matlab/RightEye');
yarp.Network.init();
% prepare a property object
headOptions = yarp.Property();
headOptions.put('device','remote_controlboard');
headOptions.put('local','/client/head');
headOptions.put('remote','/icubSim/head');
% create remote driver
headDriver = yarp.PolyDriver(headOptions);
headPos = headDriver.viewIPositionControl();
headEncs = headDriver.viewIEncoders();
joints=headPos.getAxes(); % get the number of controlled axes in joints
% %print 'Controlling', 'joints'
encoders=yarp.Vector(joints);
headEncs.getEncoders(encoders.data());
objcoorPort=Port;
objcoorPort.open('/matlab/objcoordTx');
%objs=Bottle;
objs=Bottle; Following the result of same code which is working at my computer. Error:
Thanks............................... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Very likely, if you run the command below $ yarpdev --list | grep remote_controlboard you won't find any reference, meaning that YARP is unable to find the necessary information to instantiate the device driver network wrapper. A possible solution is suggested in the output you reported:
If you install the software using the |
Beta Was this translation helpful? Give feedback.
Very likely, if you run the command below
$ yarpdev --list | grep remote_controlboard
you won't find any reference, meaning that YARP is unable to find the necessary information to instantiate the device driver network wrapper.
A possible solution is suggested in the output you reported:
If you install the software using the
robotology-superbuild
, this will be taken care of. By contrast, you ought to set up theYARP_DATA_DIRS
env variable pointing to a proper path under which that particular ini file is stored.