Wiki

Clone wiki

scl-manips-v2 / apps / scl_network_ctrl

Network libraries of interest

Network communication protocol. Mode 1 : Physics server, controller client

Server : The physics engine

Server Socket 1 : Sends a packet with the following format:

1 doublepkt_size = total number of doubles in the packet (including the first pkt_size double)
1 doublenum_control_points (Eg. xyz control points set by a haptics device or by the keyboard)
n-dof doublesq (generalized coords)
n-dof doublesdq (generalized velocities)
n-dof doublesddq (generalized accelerations)
3 doublesControl point 1
3 doublesControl point 2
...
3 doublesControl point n

Total packet size : { 2 + 3*n-dof + 3*n-control_points }
Max packet size : 1024 doubles

Server Socket 2 : Receives a packet with the following format

1 doublepkt_size = total number of doubles in the packet (including the first pkt_size double)
n-dof doublescommand torques/forces (in generalized coordinates)

Total packet size : { 1 + n-dof }
Max packet size : 1024 doubles

Client : The controller

Client Socket 1 : Receives a packet with the following format:

1 doublepkt_size = total number of doubles in the packet (including the first pkt_size double)
1 doublenum_control_points (Eg. xyz control points set by a haptics device or by the keyboard)
n-dof doublesq (generalized coords)
n-dof doublesdq (generalized velocities)
n-dof doublesddq (generalized accelerations)
3 doublesControl point 1
3 doublesControl point 2
...
3 doublesControl point n

Total packet size : { 2 + 3*n-dof + 3*n-control_points }
Max packet size : 1024 doubles

Client Socket 2 : Sends a packet with the following format

1 doublepkt_size = total number of doubles in the packet (including the first pkt_size double)
n-dof doublescommand torques/forces (in generalized coordinates)

Total packet size : { 1 + n-dof }
Max packet size : 1024 doubles

Updated