Unable to Specify Robot Name and Modify Port for Extern Controllers in Webots R2023b on Windows 10

96 views Asked by At

I am working in a world setup where I have a robot node (Abot) and a supervisor node (robot) in Webots R2023b on a Windows 10 system. According to the user guidelines, I am trying to control these two nodes on the same port (1234) under different processes, as well as under different ports. Taking the Abot node as an example, I use the following command:

command = [
        "D:\\Program Files\\Webots\\msys64\\mingw64\\bin\\webots-controller.exe",
        "D:\\Abot\\controllers\\robot_run\\robot_run.py",
        "--robot-name='Abot'",
        ]

However, no matter how I attempt, when both nodes have their controller set to extern, the result always displays:

The started controller targets a local instance (ipc protocol) of Webots with port number 1234. Targeting the only robot waiting for an extern controller.
No robot name provided, Webots instance 1234 should have exactly one robot set with an controller.
Available robots with controllers are:

Abot
robot

I am puzzled and tried the same command on a Windows CMD window and got the same result:+

C:\Users\ningtianze>"D:\Program Files\Webots\msys64\mingw64\bin\webots-controller.exe" "D:\Abot\controllers\robot_run\robot_run.py" "--robot-name='Abot'"

The started controller targets a local instance (ipc protocol) of Webots with port number 1234. Targeting the only robot waiting for an extern controller.
No robot name provided, Webots instance 1234 should have exactly one robot set with an controller.
Available robots with controllers are:

Abot
robot

However, when only one extern is opened in the world, the command webots-controller.exe [options] path/to/controller/file [controller-args] can function normally, and the --robot-name can be ignored. In summary, the [controller-args] part mentioned in the Webots documentation seems to have no effect.

I want to know how to effectively modify the port and control based on the robot name.

Background: I am using Windows 10, PyCharm, and Webots R2023b.

I hope someone can help me solve this problem

0

There are 0 answers