Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to connect to multiple remotecontrolboard clients on MacOS #186

Open
lrapetti opened this issue Jan 30, 2020 · 28 comments
Open

Unable to connect to multiple remotecontrolboard clients on MacOS #186

lrapetti opened this issue Jan 30, 2020 · 28 comments

Comments

@lrapetti
Copy link
Member

Description

I am trying to run a Simulink project using WBToolbox to control two robots in a Gazebo simulation. The project was working a couple of months ago (in the middle for sure I updated YARP to more recent versions, and eventually other folders, not sure of all the changes) but now I am no longer able to have it running. Commenting out one or the other robot the project is working, but when I try to run it with both the robots, it is failing giving following errors:

...
yarp: No connection to nameserver
yarp: *** try running: yarp detect ***
yarp: No connection to nameserver
yarp: *** try running: yarp detect ***
yarp: Receiving input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i using udp
yarp: Removing input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i
yarpdev: ***ERROR*** driver <remote_controlboard> was found but could not open
yarp: Removing output from 
...

(full terminal and Simulink diagnostic output can be found below)

The problem is somehow similar to robotology/yarp#1850.

Additional context

Simulink configuration
Outer view of the Simulink project:
Screenshot 2020-01-30 at 17 09 06
Each robot block contains the Config and the WBtoolbox boxes as in the following picture
Screenshot 2020-01-30 at 17 09 38

For each robot I have a different configuration:

  • Robot 1
WBTConfigRobot_1 = 

  Configuration with properties:

             RobotName: 'iCub1'
              UrdfFile: 'model.urdf'
      ControlledJoints: {1×23 cell}
    ControlBoardsNames: {'torso'  'left_arm'  'right_arm'  'left_leg'  'right_leg'}
             LocalName: 'WBT'
         GravityVector: [0 0 -9.8100]
    ValidConfiguration: 1
  • Robot 2
WBTConfigRobot_2 = 

  Configuration with properties:

             RobotName: 'iCub2'
              UrdfFile: 'model.urdf'
      ControlledJoints: {1×23 cell}
    ControlBoardsNames: {'torso'  'left_arm'  'right_arm'  'left_leg'  'right_leg'}
             LocalName: 'WBT'
         GravityVector: [0 0 -9.8100]
    ValidConfiguration: 1

terminals outputs
Matlab terminal:

yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/rpc:o active at tcp://10.240.2.21:10086/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/command:o active at tcp://10.240.2.21:10087/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/stateExt:i active at tcp://10.240.2.21:10088/
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/rpc:o to /iCub1/torso/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/command:o to /iCub1/torso/command:i using udp
yarp: Receiving input from /iCub1/torso/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/rpc:o active at tcp://10.240.2.21:10089/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/command:o active at tcp://10.240.2.21:10090/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/stateExt:i active at tcp://10.240.2.21:10091/
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/rpc:o to /iCub1/left_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/command:o to /iCub1/left_arm/command:i using udp
yarp: Receiving input from /iCub1/left_arm/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/rpc:o active at tcp://10.240.2.21:10092/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/command:o active at tcp://10.240.2.21:10093/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/stateExt:i active at tcp://10.240.2.21:10094/
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/rpc:o to /iCub1/right_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/command:o to /iCub1/right_arm/command:i using udp
yarp: Receiving input from /iCub1/right_arm/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/rpc:o active at tcp://10.240.2.21:10095/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/command:o active at tcp://10.240.2.21:10096/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/stateExt:i active at tcp://10.240.2.21:10097/
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/rpc:o to /iCub1/left_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/command:o to /iCub1/left_leg/command:i using udp
yarp: Receiving input from /iCub1/left_leg/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/rpc:o active at tcp://10.240.2.21:10098/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/command:o active at tcp://10.240.2.21:10099/
yarp: Port /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/stateExt:i active at tcp://10.240.2.21:10100/
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/rpc:o to /iCub1/right_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/command:o to /iCub1/right_leg/command:i using udp
yarp: Receiving input from /iCub1/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/rpc:o active at tcp://10.240.2.21:10102/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/command:o active at tcp://10.240.2.21:10103/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/stateExt:i active at tcp://10.240.2.21:10104/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i using udp
yarp: Receiving input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/rpc:o active at tcp://10.240.2.21:10105/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/command:o active at tcp://10.240.2.21:10106/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/stateExt:i active at tcp://10.240.2.21:10107/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/rpc:o to /iCub2/left_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/command:o to /iCub2/left_arm/command:i using udp
yarp: Receiving input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/rpc:o active at tcp://10.240.2.21:10108/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/command:o active at tcp://10.240.2.21:10109/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/stateExt:i active at tcp://10.240.2.21:10110/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/rpc:o to /iCub2/right_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/command:o to /iCub2/right_arm/command:i using udp
yarp: Receiving input from /iCub2/right_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/rpc:o active at tcp://10.240.2.21:10111/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/command:o active at tcp://10.240.2.21:10112/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/stateExt:i active at tcp://10.240.2.21:10113/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/rpc:o to /iCub2/left_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/command:o to /iCub2/left_leg/command:i using udp
yarp: Receiving input from /iCub2/left_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/rpc:o active at tcp://10.240.2.21:10114/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/command:o active at tcp://10.240.2.21:10115/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i active at tcp://10.240.2.21:10116/
yarp: No connection to nameserver
yarp: *** try running: yarp detect ***
yarp: No connection to nameserver
yarp: *** try running: yarp detect ***
yarp: Receiving input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i using udp
yarp: Removing input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i
yarpdev: ***ERROR*** driver <remote_controlboard> was found but could not open
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i
yarp: Removing input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/rpc:o to /iCub2/left_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/command:o to /iCub2/left_arm/command:i
yarp: Removing input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/rpc:o to /iCub2/right_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/command:o to /iCub2/right_arm/command:i
yarp: Removing input from /iCub2/right_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/rpc:o to /iCub2/left_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/command:o to /iCub2/left_leg/command:i
yarp: Removing input from /iCub2/left_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/stateExt:i
yarpdev: ***ERROR*** driver <remotecontrolboardremapper> was found but could not open
Failed to open the RemoteControlBoardRemapper with the options passed.
Failed to initialize the RemoteControlBoardRemapper.
Failed to get IEncoders interface.
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/rpc:o to /iCub1/torso/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/command:o to /iCub1/torso/command:i
yarp: Removing input from /iCub1/torso/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/torso/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/rpc:o to /iCub1/left_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/command:o to /iCub1/left_arm/command:i
yarp: Removing input from /iCub1/left_arm/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/rpc:o to /iCub1/right_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/command:o to /iCub1/right_arm/command:i
yarp: Removing input from /iCub1/right_arm/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/rpc:o to /iCub1/left_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/command:o to /iCub1/left_leg/command:i
yarp: Removing input from /iCub1/left_leg/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/left_leg/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/rpc:o to /iCub1/right_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/command:o to /iCub1/right_leg/command:i
yarp: Removing input from /iCub1/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot1Configuration/iCub1/right_leg/stateExt:i
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/rpc:o active at tcp://10.240.2.21:10102/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/command:o active at tcp://10.240.2.21:10103/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/stateExt:i active at tcp://10.240.2.21:10104/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i using udp
yarp: Receiving input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/rpc:o active at tcp://10.240.2.21:10105/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/command:o active at tcp://10.240.2.21:10106/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/stateExt:i active at tcp://10.240.2.21:10107/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/rpc:o to /iCub2/left_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/command:o to /iCub2/left_arm/command:i using udp
yarp: Receiving input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/rpc:o active at tcp://10.240.2.21:10108/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/command:o active at tcp://10.240.2.21:10109/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/stateExt:i active at tcp://10.240.2.21:10110/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/rpc:o to /iCub2/right_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/command:o to /iCub2/right_arm/command:i using udp
yarp: Receiving input from /iCub2/right_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/rpc:o active at tcp://10.240.2.21:10111/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/command:o active at tcp://10.240.2.21:10112/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/stateExt:i active at tcp://10.240.2.21:10113/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/rpc:o to /iCub2/left_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/command:o to /iCub2/left_leg/command:i using udp
yarp: Receiving input from /iCub2/left_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/rpc:o active at tcp://10.240.2.21:10114/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/command:o active at tcp://10.240.2.21:10115/
yarp: Port /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i active at tcp://10.240.2.21:10116/
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/rpc:o to /iCub2/right_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/command:o to /iCub2/right_leg/command:i using udp
yarp: Receiving input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i using udp
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i
yarp: Removing input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/torso/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/rpc:o to /iCub2/left_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/command:o to /iCub2/left_arm/command:i
yarp: Removing input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/rpc:o to /iCub2/right_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/command:o to /iCub2/right_arm/command:i
yarp: Removing input from /iCub2/right_arm/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/rpc:o to /iCub2/left_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/command:o to /iCub2/left_leg/command:i
yarp: Removing input from /iCub2/left_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/left_leg/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/rpc:o to /iCub2/right_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/command:o to /iCub2/right_leg/command:i
yarp: Removing input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingRobot2Configuration/iCub2/right_leg/stateExt:i

Simulink diagnostic

...
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]created device <remotecontrolboardremapper>. See C++ class RemoteControlBoardRemapper for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[ERROR]Problem connecting to /iCub2/right_leg/rpc:i, is the remote device available?
[ERROR]Problem connecting to /iCub2/right_leg/command:i, is the remote device available?
[ERROR]RemoteControlBoardRemapper: error opening remote_controlboard with remote " /iCub2/right_leg ", opening the device failed. 
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]RemoteControlBoard is ENABLING the writeStrict option for all commands
[INFO]created device <remote_controlboard>. See C++ class RemoteControlBoard for documentation.
[INFO]created device <remotecontrolboardremapper>. See C++ class RemoteControlBoardRemapper for documentation.
An error occurred while running the simulation and the simulation was terminated
Caused by:
Error reported by S-function 'BlockFactory' in 'torqueControlBalancing/Robot 2/GetMeasurement1/S-Function': 
Component:Simulink | Category:Block diagram error
...
  • yarp name list . output
...
registration name /iCub1/head/command:i ip 10.240.2.21 port 10032 type tcp
registration name /iCub1/head/rpc:i ip 10.240.2.21 port 10031 type tcp
registration name /iCub1/head/state:o ip 10.240.2.21 port 10033 type tcp
registration name /iCub1/head/stateExt:o ip 10.240.2.21 port 10034 type tcp
registration name /iCub1/left_arm/command:i ip 10.240.2.21 port 10036 type tcp
registration name /iCub1/left_arm/rpc:i ip 10.240.2.21 port 10035 type tcp
registration name /iCub1/left_arm/state:o ip 10.240.2.21 port 10037 type tcp
registration name /iCub1/left_arm/stateExt:o ip 10.240.2.21 port 10038 type tcp
registration name /iCub1/left_hand/inertialMTB ip 10.240.2.21 port 10022 type tcp
registration name /iCub1/left_hand/inertialMTB/rpc:i ip 10.240.2.21 port 10021 type tcp
registration name /iCub1/left_leg/command:i ip 10.240.2.21 port 10048 type tcp
registration name /iCub1/left_leg/inertialMTB ip 10.240.2.21 port 10018 type tcp
registration name /iCub1/left_leg/inertialMTB/rpc:i ip 10.240.2.21 port 10017 type tcp
registration name /iCub1/left_leg/rpc:i ip 10.240.2.21 port 10047 type tcp
registration name /iCub1/left_leg/state:o ip 10.240.2.21 port 10049 type tcp
registration name /iCub1/left_leg/stateExt:o ip 10.240.2.21 port 10050 type tcp
registration name /iCub1/right_arm/command:i ip 10.240.2.21 port 10040 type tcp
registration name /iCub1/right_arm/rpc:i ip 10.240.2.21 port 10039 type tcp
registration name /iCub1/right_arm/state:o ip 10.240.2.21 port 10041 type tcp
registration name /iCub1/right_arm/stateExt:o ip 10.240.2.21 port 10042 type tcp
registration name /iCub1/right_hand/inertialMTB ip 10.240.2.21 port 10024 type tcp
registration name /iCub1/right_hand/inertialMTB/rpc:i ip 10.240.2.21 port 10023 type tcp
registration name /iCub1/right_leg/command:i ip 10.240.2.21 port 10044 type tcp
registration name /iCub1/right_leg/inertialMTB ip 10.240.2.21 port 10020 type tcp
registration name /iCub1/right_leg/inertialMTB/rpc:i ip 10.240.2.21 port 10019 type tcp
registration name /iCub1/right_leg/rpc:i ip 10.240.2.21 port 10043 type tcp
registration name /iCub1/right_leg/state:o ip 10.240.2.21 port 10045 type tcp
registration name /iCub1/right_leg/stateExt:o ip 10.240.2.21 port 10046 type tcp
registration name /iCub1/torso/command:i ip 10.240.2.21 port 10028 type tcp
registration name /iCub1/torso/inertialMTB ip 10.240.2.21 port 10026 type tcp
registration name /iCub1/torso/inertialMTB/rpc:i ip 10.240.2.21 port 10025 type tcp
registration name /iCub1/torso/rpc:i ip 10.240.2.21 port 10027 type tcp
registration name /iCub1/torso/state:o ip 10.240.2.21 port 10029 type tcp
registration name /iCub1/torso/stateExt:o ip 10.240.2.21 port 10030 type tcp
registration name /iCub2/head/command:i ip 10.240.2.21 port 10067 type tcp
registration name /iCub2/head/rpc:i ip 10.240.2.21 port 10066 type tcp
registration name /iCub2/head/state:o ip 10.240.2.21 port 10068 type tcp
registration name /iCub2/head/stateExt:o ip 10.240.2.21 port 10069 type tcp
registration name /iCub2/left_arm/command:i ip 10.240.2.21 port 10071 type tcp
registration name /iCub2/left_arm/rpc:i ip 10.240.2.21 port 10070 type tcp
registration name /iCub2/left_arm/state:o ip 10.240.2.21 port 10072 type tcp
registration name /iCub2/left_arm/stateExt:o ip 10.240.2.21 port 10073 type tcp
registration name /iCub2/left_hand/inertialMTB ip 10.240.2.21 port 10057 type tcp
registration name /iCub2/left_hand/inertialMTB/rpc:i ip 10.240.2.21 port 10056 type tcp
registration name /iCub2/left_leg/command:i ip 10.240.2.21 port 10083 type tcp
registration name /iCub2/left_leg/inertialMTB ip 10.240.2.21 port 10053 type tcp
registration name /iCub2/left_leg/inertialMTB/rpc:i ip 10.240.2.21 port 10052 type tcp
registration name /iCub2/left_leg/rpc:i ip 10.240.2.21 port 10082 type tcp
registration name /iCub2/left_leg/state:o ip 10.240.2.21 port 10084 type tcp
registration name /iCub2/left_leg/stateExt:o ip 10.240.2.21 port 10085 type tcp
registration name /iCub2/right_arm/command:i ip 10.240.2.21 port 10075 type tcp
registration name /iCub2/right_arm/rpc:i ip 10.240.2.21 port 10074 type tcp
registration name /iCub2/right_arm/state:o ip 10.240.2.21 port 10076 type tcp
registration name /iCub2/right_arm/stateExt:o ip 10.240.2.21 port 10077 type tcp
registration name /iCub2/right_hand/inertialMTB ip 10.240.2.21 port 10059 type tcp
registration name /iCub2/right_hand/inertialMTB/rpc:i ip 10.240.2.21 port 10058 type tcp
registration name /iCub2/right_leg/command:i ip 10.240.2.21 port 10079 type tcp
registration name /iCub2/right_leg/inertialMTB ip 10.240.2.21 port 10055 type tcp
registration name /iCub2/right_leg/inertialMTB/rpc:i ip 10.240.2.21 port 10054 type tcp
registration name /iCub2/right_leg/rpc:i ip 10.240.2.21 port 10078 type tcp
registration name /iCub2/right_leg/state:o ip 10.240.2.21 port 10080 type tcp
registration name /iCub2/right_leg/stateExt:o ip 10.240.2.21 port 10081 type tcp
registration name /iCub2/torso/command:i ip 10.240.2.21 port 10063 type tcp
registration name /iCub2/torso/inertialMTB ip 10.240.2.21 port 10061 type tcp
registration name /iCub2/torso/inertialMTB/rpc:i ip 10.240.2.21 port 10060 type tcp
registration name /iCub2/torso/rpc:i ip 10.240.2.21 port 10062 type tcp
registration name /iCub2/torso/state:o ip 10.240.2.21 port 10064 type tcp
registration name /iCub2/torso/stateExt:o ip 10.240.2.21 port 10065 type tcp
...

Additional information

  • OS: MacOS 10.14.6
  • YARP version: 3.3.1
  • WBtoolbox: master (114ac0e)
  • Matlab Version: 2019b
@lrapetti
Copy link
Member Author

I tried also with a different project that connects to multiple robots and I am getting the same error.

@lrapetti
Copy link
Member Author

cc @Yeshasvitvs @diegoferigo

@traversaro
Copy link
Member

I think the original intuition by @barbalberto in the comment in robotology/yarp#1850 (comment) may be a good hint.

Nevertheless, to have something more actionable, I think you should proceed as in the following. As nothing changed recently in WB-Toolbox or BlockFactory, indeed a change of YARP can be a good candidate for creating this issue. First of all, find a YARP commit that is working fine, based on your original comment I would try to see if YARP v3.2.2 is working fine instead. If that tag is working fine while v3.3.1 is not working, then we are on a good track. Between v3.2.2 and v3.3.1 there are ~280 commits (see robotology/yarp@v3.2.2...v3.3.1), so by using git bisect it should just take ≈ log2(280) ≈ 9 tests to actually find the commit that introduced the problem.

@traversaro
Copy link
Member

For simplify the debugging, it would also be useful to have a Wireshark dump of the loopback traffic when you get this error.

@lrapetti
Copy link
Member Author

From a preliminary test I found out that is not working with YARP 3.2.2 but it is working with YARP 3.2.0. I will try to investigate further about the exact commit.

@traversaro
Copy link
Member

traversaro commented Jan 31, 2020

From a preliminary test I found out that is not working with YARP 3.2.2 but it is working with YARP 3.2.0. I will try to investigate further about the exact commit.

If you are taking bets, I would put my money on robotology/yarp@1c1d01b or robotology/yarp@6476dcf .

@lrapetti
Copy link
Member Author

From a preliminary test I found out that is not working with YARP 3.2.2 but it is working with YARP 3.2.0. I will try to investigate further about the exact commit.

Unfortunately, after moving around with the commits I was no longer able to have it working (not even with 3.2.0, but I am sure at a certain point it was working), which makes me a bit confused about the origin of the problem (or about my focus during those tests).

@lrapetti
Copy link
Member Author

Unfortunately, after moving around with the commits I was no longer able to have it working (not even with 3.2.0, but I am sure at a certain point it was working)

I discovered that if I compile master and then I switch to 3.2.0, then it is working (on 3.2.0). While moving trough intermediate commits and then to 3.2.0 apparently screwed the things.

@traversaro
Copy link
Member

Unfortunately, after moving around with the commits I was no longer able to have it working (not even with 3.2.0, but I am sure at a certain point it was working)

I discovered that if I compile master and then I switch to 3.2.0, then it is working (on 3.2.0). While moving trough intermediate commits and then to 3.2.0 apparently screwed the things.

Mhh, it could be something strange in the build system. It is probably a good idea to test each commit from a clean build.

@traversaro
Copy link
Member

Two things that I forgot:

  • To quickly compile even from a clean build, always use ccache
  • It is also possible that the failure is not deterministic itself, so it is possible that it something that may go wrong also in 3.2.0, but in master has an higher probability of failure (for example if it is some kind of race condition or similar).

@lrapetti
Copy link
Member Author

lrapetti commented Feb 4, 2020

Mhh, it could be something strange in the build system. It is probably a good idea to test each commit from a clean build.

I did test with clean build of different commits and releases (recompiling YARP, gazebo-yarp-plugins and wb-toolbox) but I was not able to find a properly working commit (I moved from 3.2.0 on).

  • It is also possible that the failure is not deterministic itself, so it is possible that it something that may go wrong also in 3.2.0, but in master has an higher probability of failure (for example if it is some kind of race condition or similar).

Unfortunately this seems to me to be the most likely condition, I will report soon the output of some test remaining showing this condition.

@lrapetti
Copy link
Member Author

lrapetti commented Feb 4, 2020

  • It is also possible that the failure is not deterministic itself, so it is possible that it something that may go wrong also in 3.2.0, but in master has an higher probability of failure (for example if it is some kind of race condition or similar).

Unfortunately this seems to me to be the most likely condition, I will report soon the output of some test remaining showing this condition.

The following results have been obtained, trough different runs in chronoligical order, with YARP3.2.0 (where the coloumns indicate which software have been restarted after the previous try):

result Yarp server Gz Simulink Matlab
Fail x x x x
Fail x
Success x x x x
Success x x
Success x x
Fail x x x x
Fail x
Fail x
Fail x
Fail x x
Fail x x
Fail x x x
Fail x x x
Fail x x x x
Fail x x x x
Fail x x x x
Success x x x x
Success x x x
Fail (Gz crash) x x x
Success x x x x

@lrapetti
Copy link
Member Author

lrapetti commented Feb 4, 2020

Similar with the previous comment, those are some test with YARP3.3.101 (current master)

result Yarp server Gz Simulink Matlab
Fail x x x x
Fail x x x x
Fail
Fail x
Fail x x
Success x x x x
Success x
Success x x
Success x
Success x x
Success x x x
Success x x x x

So it doesn't seem to be much related to the YARP version

@traversaro
Copy link
Member

At this point, I think the problem is some yarpserver race condition that has been part of yarpserver for a long time, and for some reason (that could also be related to something on your PC) you are noticing it only now.

@lrapetti
Copy link
Member Author

lrapetti commented Feb 5, 2020

I agree it is some kind of race condition, but would you exclude is something related to wb-toolbox?

I tried to debug a bit understanding where is is failing in initializeRemoteControlBoardRemapper, and I have noticed something strange:

  • the initialization is completed for the first model (iCub1)
  • then it starts the initialization of the second model (iCub2), and in the middle we see the errors and all the ports for the first model (iCub1) are removed
  • then it starts again the initialization for the second model (iCub2), and this times it seems to be completed succesfully
  • finally all the ports of the second model (iCub2) are removed

you can see this events in the following output (search for START initializeRemoteControlBoardRemapper and FINISH initializeRemoteControlBoardRemapper)

iCub1 : START initializeRemoteControlBoardRemapper 
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/rpc:o active at tcp://10.255.111.23:10087/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/command:o active at tcp://10.255.111.23:10088/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/stateExt:i active at tcp://10.255.111.23:10089/
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/rpc:o to /iCub1/torso/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/command:o to /iCub1/torso/command:i using udp
yarp: Receiving input from /iCub1/torso/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/rpc:o active at tcp://10.255.111.23:10090/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/command:o active at tcp://10.255.111.23:10091/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/stateExt:i active at tcp://10.255.111.23:10092/
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/rpc:o to /iCub1/left_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/command:o to /iCub1/left_arm/command:i using udp
yarp: Receiving input from /iCub1/left_arm/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/rpc:o active at tcp://10.255.111.23:10093/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/command:o active at tcp://10.255.111.23:10094/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/stateExt:i active at tcp://10.255.111.23:10095/
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/rpc:o to /iCub1/right_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/command:o to /iCub1/right_arm/command:i using udp
yarp: Receiving input from /iCub1/right_arm/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/rpc:o active at tcp://10.255.111.23:10096/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/command:o active at tcp://10.255.111.23:10097/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/stateExt:i active at tcp://10.255.111.23:10098/
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/rpc:o to /iCub1/left_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/command:o to /iCub1/left_leg/command:i using udp
yarp: Receiving input from /iCub1/left_leg/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/rpc:o active at tcp://10.255.111.23:10099/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/command:o active at tcp://10.255.111.23:10100/
yarp: Port /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/stateExt:i active at tcp://10.255.111.23:10101/
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/rpc:o to /iCub1/right_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/command:o to /iCub1/right_leg/command:i using udp
yarp: Receiving input from /iCub1/right_leg/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/stateExt:i using udp
iCub1 : FINISH initializeRemoteControlBoardRemapper 
iCub2 : START initializeRemoteControlBoardRemapper 
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/rpc:o active at tcp://10.255.111.23:10102/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/command:o active at tcp://10.255.111.23:10103/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/stateExt:i active at tcp://10.255.111.23:10104/
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i using udp
yarp: Receiving input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/rpc:o active at tcp://10.255.111.23:10105/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/command:o active at tcp://10.255.111.23:10106/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/stateExt:i active at tcp://10.255.111.23:10107/
yarp: No connection to nameserver
yarp: *** try running: yarp detect ***
yarp: No connection to nameserver
yarp: *** try running: yarp detect ***
yarp: Receiving input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/stateExt:i using udp
yarp: Removing input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/stateExt:i
yarpdev: ***ERROR*** driver <remote_controlboard> was found but could not open
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i
yarp: Removing input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/stateExt:i
yarpdev: ***ERROR*** driver <remotecontrolboardremapper> was found but could not open
Failed to open the RemoteControlBoardRemapper with the options passed.
Failed to initialize the RemoteControlBoardRemapper.
Failed to get IEncoders interface.
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/rpc:o to /iCub1/torso/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/command:o to /iCub1/torso/command:i
yarp: Removing input from /iCub1/torso/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/torso/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/rpc:o to /iCub1/left_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/command:o to /iCub1/left_arm/command:i
yarp: Removing input from /iCub1/left_arm/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/rpc:o to /iCub1/right_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/command:o to /iCub1/right_arm/command:i
yarp: Removing input from /iCub1/right_arm/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/rpc:o to /iCub1/left_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/command:o to /iCub1/left_leg/command:i
yarp: Removing input from /iCub1/left_leg/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/left_leg/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/rpc:o to /iCub1/right_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/command:o to /iCub1/right_leg/command:i
yarp: Removing input from /iCub1/right_leg/stateExt:o to /WBT/torqueControlBalancingModel1Robot1Configuration/iCub1/right_leg/stateExt:i
iCub2 : START initializeRemoteControlBoardRemapper 
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/rpc:o active at tcp://10.255.111.23:10102/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/command:o active at tcp://10.255.111.23:10103/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/stateExt:i active at tcp://10.255.111.23:10104/
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i using udp
yarp: Receiving input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/rpc:o active at tcp://10.255.111.23:10105/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/command:o active at tcp://10.255.111.23:10106/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/stateExt:i active at tcp://10.255.111.23:10107/
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/rpc:o to /iCub2/left_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/command:o to /iCub2/left_arm/command:i using udp
yarp: Receiving input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/rpc:o active at tcp://10.255.111.23:10108/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/command:o active at tcp://10.255.111.23:10109/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/stateExt:i active at tcp://10.255.111.23:10110/
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/rpc:o to /iCub2/right_arm/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/command:o to /iCub2/right_arm/command:i using udp
yarp: Receiving input from /iCub2/right_arm/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/rpc:o active at tcp://10.255.111.23:10111/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/command:o active at tcp://10.255.111.23:10112/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/stateExt:i active at tcp://10.255.111.23:10113/
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/rpc:o to /iCub2/left_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/command:o to /iCub2/left_leg/command:i using udp
yarp: Receiving input from /iCub2/left_leg/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/stateExt:i using udp
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/rpc:o active at tcp://10.255.111.23:10114/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/command:o active at tcp://10.255.111.23:10115/
yarp: Port /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/stateExt:i active at tcp://10.255.111.23:10116/
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/rpc:o to /iCub2/right_leg/rpc:i using tcp
yarp: Sending output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/command:o to /iCub2/right_leg/command:i using udp
yarp: Receiving input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/stateExt:i using udp
iCub2 : FINISH initializeRemoteControlBoardRemapper 
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/rpc:o to /iCub2/torso/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/command:o to /iCub2/torso/command:i
yarp: Removing input from /iCub2/torso/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/torso/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/rpc:o to /iCub2/left_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/command:o to /iCub2/left_arm/command:i
yarp: Removing input from /iCub2/left_arm/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/rpc:o to /iCub2/right_arm/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/command:o to /iCub2/right_arm/command:i
yarp: Removing input from /iCub2/right_arm/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_arm/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/rpc:o to /iCub2/left_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/command:o to /iCub2/left_leg/command:i
yarp: Removing input from /iCub2/left_leg/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/left_leg/stateExt:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/rpc:o to /iCub2/right_leg/rpc:i
yarp: Removing output from /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/command:o to /iCub2/right_leg/command:i
yarp: Removing input from /iCub2/right_leg/stateExt:o to /WBT/torqueControlBalancingModel2Robot2Configuration/iCub2/right_leg/stateExt:i

aren't this sequence of events and the fact that the second model is initialized twice, strange?
@traversaro @diegoferigo

@lrapetti
Copy link
Member Author

lrapetti commented Feb 5, 2020

Today I have tested the same code with the following configuration:
OS: Ubuntu 18.04
YARP: 3.2.101
Matlab: R2018a

and I didn't experience the failure. Further investigation should be done in order to understand if the problem is related to Matlab version or OS.

@lrapetti
Copy link
Member Author

lrapetti commented Feb 6, 2020

Adding some note on debugging the error, the error appears in the open() call for the polyDriver.
The passed arguments seems to be fine:

  • iCub 1
(REMOTE_CONTROLBOARD_OPTIONS (writeStrict on)) (axesNames (torso_pitch torso_roll torso_yaw l_shoulder_pitch l_shoulder_roll l_shoulder_yaw l_elbow r_shoulder_pitch r_shoulder_roll r_shoulder_yaw r_elbow l_hip_pitch l_hip_roll l_hip_yaw l_knee l_ankle_pitch l_ankle_roll r_hip_pitch r_hip_roll r_hip_yaw r_knee r_ankle_pitch r_ankle_roll)) (device remotecontrolboardremapper) (localPortPrefix "/WBT/torqueControlBalancingModel1Robot1Configuration") (remoteControlBoards ("/iCub1/torso" "/iCub1/left_arm" "/iCub1/right_arm" "/iCub1/left_leg" "/iCub1/right_leg")
  • iCub 2
(REMOTE_CONTROLBOARD_OPTIONS (writeStrict on)) (axesNames (torso_pitch torso_roll torso_yaw l_shoulder_pitch l_shoulder_roll l_shoulder_yaw l_elbow r_shoulder_pitch r_shoulder_roll r_shoulder_yaw r_elbow l_hip_pitch l_hip_roll l_hip_yaw l_knee l_ankle_pitch l_ankle_roll r_hip_pitch r_hip_roll r_hip_yaw r_knee r_ankle_pitch r_ankle_roll)) (device remotecontrolboardremapper) (localPortPrefix "/WBT/torqueControlBalancingModel2Robot2Configuration") (remoteControlBoards ("/iCub2/torso" "/iCub2/left_arm" "/iCub2/right_arm" "/iCub2/left_leg" "/iCub2/right_leg"))

@diegoferigo
Copy link
Member

The configuration seems correct, I confirm. As discussed in the previous days f2f, did you have the chance to extend the test done in #186 (comment) and try an Ubuntu machine with the new 2019b Matlab version?

In this way we know that the problem is not related to the Matlab version you have on your computer nor Ubuntu. The only difference therefore is MacOS, and we can limit the debugging to the portions of code (or loaded libraries) of the OS.


Another try, as discussed, could be trying to switch on / off ACE in YARP (I think it's on by default). On Ubuntu I know it can be done and everything should work even without ACE, I'm not sure if it can be done also on MacOS.

@lrapetti
Copy link
Member Author

lrapetti commented Feb 6, 2020

The configuration seems correct, I confirm. As discussed in the previous days f2f, did you have the chance to extend the test done in #186 (comment) and try an Ubuntu machine with the new 2019b Matlab version?

I will procede with this tests

Another try, as discussed, could be trying to switch on / off ACE in YARP (I think it's on by default). On Ubuntu I know it can be done and everything should work even without ACE, I'm not sure if it can be done also on MacOS.

I don't see any YARP_USE_ACE option in cmake

In addition, I did some check with the debugger, and I have found out that the second initialisation of iCub2 (the succesfully one) that I was seeing in #186 (comment) was triggered by the call of getRobotInterface in the block termination

bool SetReferences::terminate(const BlockInformation* blockInfo)
{
using namespace yarp::dev;
bool ok = true;
// Get the RobotInterface and the DoFs
const auto robotInterface = getRobotInterface();

this explain hence the presence of two initializations for iCub2

@traversaro
Copy link
Member

Another try, as discussed, could be trying to switch on / off ACE in YARP (I think it's on by default). On Ubuntu I know it can be done and everything should work even without ACE, I'm not sure if it can be done also on MacOS.

I don't see any YARP_USE_ACE option in cmake

The option is SKIP_ACE .

@diegoferigo
Copy link
Member

In addition, I did some check with the debugger, and I have found out that the second initialisation of iCub2 (the succesfully one) that I was seeing in #186 (comment) was triggered by the call of getRobotInterface in the block termination

Good catch! Thanks GDB :)

@lrapetti
Copy link
Member Author

lrapetti commented Feb 6, 2020

@diegoferigo

Good catch! Thanks GDB LLDB :)

@lrapetti
Copy link
Member Author

lrapetti commented Feb 6, 2020

Another try, as discussed, could be trying to switch on / off ACE in YARP (I think it's on by default). On Ubuntu I know it can be done and everything should work even without ACE, I'm not sure if it can be done also on MacOS.

I don't see any YARP_USE_ACE option in cmake

The option is SKIP_ACE .

The compilation is failing when SKIP_ACE is on.

[  2%] Building CXX object src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/Carrier.cpp.o
In file included from /Users/lorenzorapetti/Software/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/Carrier.cpp:11:
In file included from /Users/lorenzorapetti/Software/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/TcpFace.h:17:
/Users/lorenzorapetti/Software/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/TcpAcceptor.h:22:1: error: 
      Cannot implement TcpAcceptor on this platform
YARP_COMPILER_ERROR(Cannot implement TcpAcceptor on this platform)
^
/Users/lorenzorapetti/Software/robotology-superbuild/build/robotology/YARP/src/libYARP_conf/src/yarp/conf/system.h:109:35: note: 
      expanded from macro 'YARP_COMPILER_ERROR'
  #define YARP_COMPILER_ERROR(x)  __YARP_DO_PRAGMA(GCC error #x)
                                  ^
/Users/lorenzorapetti/Software/robotology-superbuild/build/robotology/YARP/src/libYARP_conf/src/yarp/conf/system.h:106:31: note: 
      expanded from macro '__YARP_DO_PRAGMA'
  #define __YARP_DO_PRAGMA(x) _Pragma (#x)
                              ^
<scratch space>:210:6: note: expanded from here
 GCC error "Cannot implement TcpAcceptor on this platform"
     ^
In file included from /Users/lorenzorapetti/Software/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/Carrier.cpp:11:
/Users/lorenzorapetti/Software/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/impl/TcpFace.h:51:21: error: 
      no type named 'TcpAcceptor' in namespace 'yarp::os::impl'
    yarp::os::impl::TcpAcceptor peerAcceptor;
    ~~~~~~~~~~~~~~~~^
/Users/lorenzorapetti/Software/robotology-superbuild/robotology/YARP/src/libYARP_os/src/yarp/os/Carrier.cpp:130:12: error: 
      cannot initialize return object of type 'yarp::os::Face *' with an rvalue
      of type 'yarp::os::impl::TcpFace *'
    return new yarp::os::impl::TcpFace();
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.
make[2]: *** [src/libYARP_os/src/CMakeFiles/YARP_os.dir/yarp/os/Carrier.cpp.o] Error 1
make[1]: *** [src/libYARP_os/src/CMakeFiles/YARP_os.dir/all] Error 2
make: *** [all] Error 2

@diegoferigo
Copy link
Member

Ok, in MacOS you must have ACE. It was worth trying.

@lrapetti lrapetti changed the title Unable to connect to multiple remotecontrolboard clients Unable to connect to multiple remotecontrolboard clients on MacOS Mar 3, 2021
@lrapetti
Copy link
Member Author

lrapetti commented Mar 3, 2021

Further investigation should be done in order to understand if the problem is related to Matlab version or OS.

Jumping back in this old issue, I have now worked for some time on Simulink models with multiple remotecontrolboard with different OS and Matlab version. I keep experiencing the same problem on MacOS, while it never happened on Ubunt.
Indeed, I think we can say the problem is OS-related, and I have update the title accordingly.

@lrapetti
Copy link
Member Author

lrapetti commented Mar 3, 2021

Actually, I think the same problem is happening also in presence of a single robot but with "heavy" models.

Today I was running a model which attaches to the control-board of a single icub running in simulation, runs a state-machine and a QP-based controller, and opens other yarp port using WB-toolbox block, and I was getting the following error in the Simulink diagnostic, which seems same as what observed above.

...
INFO] |yarp.device.remote_controlboard| RemoteControlBoard is ENABLING the writeStrict option for all commands
    [INFO] |yarp.os.Port| Port /WBT/MomentumBasedControllerModel1Configuration/icubSim/right_leg/rpc:o active at tcp://10.255.111.45:10070/
    [INFO] |yarp.os.impl.NameClient| No connection to nameserver
    [INFO] |yarp.os.impl.NameClient| *** try running: yarp detect ***
    [INFO] |yarp.os.Port| Port /WBT/MomentumBasedControllerModel1Configuration/icubSim/right_leg/command:o active at tcp://10.255.111.45:10071/
    [INFO] |yarp.os.impl.NameClient| No connection to nameserver
    [INFO] |yarp.os.impl.NameClient| *** try running: yarp detect ***
    [INFO] |yarp.os.Port| Port /WBT/MomentumBasedControllerModel1Configuration/icubSim/right_leg/stateExt:i active at tcp://10.255.111.45:10072/
    [INFO] |yarp.os.impl.NameClient| No connection to nameserver
    [INFO] |yarp.os.impl.NameClient| *** try running: yarp detect ***
    [ERROR] |yarp.device.remote_controlboard| Problem connecting to /icubSim/right_leg/rpc:i, is the remote device available?
    [INFO] |yarp.os.impl.NameClient| No connection to nameserver
    [INFO] |yarp.os.impl.NameClient| *** try running: yarp detect ***
    [ERROR] |yarp.device.remote_controlboard| Problem connecting to /icubSim/right_leg/command:i, is the remote device available?
    [INFO] |yarp.os.impl.NameClient| No connection to nameserver
    [INFO] |yarp.os.impl.NameClient| *** try running: yarp detect ***
    [ERROR] |yarp.device.remote_controlboard| Problem connecting to /icubSim/right_leg/stateExt:o, is the remote device available?
    [ERROR] |yarp.dev.PolyDriver| Driver <remote_controlboard> was found but could not open
    [ERROR] |yarp.device.remotecontrolboardremapper| Opening remote_controlboard with remote " /icubSim/right_leg ", opening the device failed.
    [ERROR] |yarp.dev.PolyDriver| Driver <remotecontrolboardremapper> was found but could not open
...

Here are the full logs:

@nunoguedelha I don't know if you followed the discussion back in time. As a MacOS user, have you ever experienced this problem?

@nunoguedelha
Copy link
Collaborator

Hi @lrapetti , just saw your comment now, sorry. I had indeed an issue last year, somewhat similar, not sure it's the same though. I'll send you the link. We can discuss on Monday.

@lrapetti
Copy link
Member Author

Hi @lrapetti , just saw your comment now, sorry. I had indeed an issue last year, somewhat similar, not sure it's the same though. I'll send you the link. We can discuss on Monday.

Thanks @nunoguedelha, let me know if you want to have a chat regarding this issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants