Skip to content

Commit f6473e6

Browse files
committed
Examples: changed default port and added explanation for the simulator's port range
1 parent 43a7bdc commit f6473e6

4 files changed

Lines changed: 12 additions & 8 deletions

File tree

‎examples/asynchronous_control.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ async def main():
2222
# Simulator
2323
connector = CRIConnector(
2424
host="127.0.0.1",
25-
port=3922,
25+
# The simulator uses the first available port in the range 3921-3931.
26+
port=3921,
2627
)
2728
# Real robot
2829
# connector = CRIConnector(
2930
# host="192.168.3.11",
30-
# port=3921,
31+
# port=3920,
3132
# )
3233

3334
# connect asynchronously

‎examples/get_joint_position.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
# controller.connect("192.168.3.11")
1919
# Simulator
2020
ip = "127.0.0.1"
21-
port = 3922
21+
# The simulator uses the first available port in the range 3921-3931.
22+
port = 3921
2223
# Real robot
2324
# ip = "192.168.3.11"
24-
# port = 3921
25+
# port = 3920
2526
if not controller.connect(ip, port):
2627
logger.error("Unable to connect to iRC! Ensure the simulator is running.")
2728
quit()

‎examples/relative_move.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
# Connect to default iRC IP
1717
# Simulator
1818
ip = "127.0.0.1"
19-
port = 3922
19+
# The simulator uses the first available port in the range 3921-3931.
20+
port = 3921
2021
# Real robot
2122
# ip = "192.168.3.11"
22-
# port = 3921
23+
# port = 3920
2324
if not controller.connect(ip, port):
2425
logger.error("Unable to connect to iRC! Ensure the simulator is running.")
2526
quit()

‎examples/start_program.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,11 @@
1616
# connect to default iRC IP
1717
# Simulator
1818
ip = "127.0.0.1"
19-
port = 3922
19+
# The simulator uses the first available port in the range 3921-3931.
20+
port = 3921
2021
# Real robot
2122
# ip = "192.168.3.11"
22-
# port = 3921
23+
# port = 3920
2324
if not controller.connect(ip, port):
2425
logger.error("Unable to connect")
2526
quit()

0 commit comments

Comments
 (0)