EZPhysics Network Protocol

EZPhysics provides a network interface for sending and receiving data from the ODE simulation. This is done through predefined packets. This page lists what these packages contain and in what order (has determined in EZNetwork class, at EZPhysicsNetwork.cpp).

An EZPhysics Network Message has the following format:

Send Packets

Send Packets refers to the packets sent from EZPhysics, which contain the latest simulation's data.

EZNETWORK_SEND_COLLISION 01

Usually sent in pairs, refers to the point of contact between two Body's.

  1. Float X of the contact point
  2. Float Y of the contact point
  3. Float Z of the contact point
  4. Float depth (penetration of the collision)

EZNETWORK_SEND_LIMB 02

A Body's output.

  1. Float X of the position vector
  2. Float Y of the position vector
  3. Float Z of the position vector
  4. Float W of the rotation quaternion
  5. Float X of the rotation quaternion
  6. Float Y of the rotation quaternion
  7. Float Z of the rotation quaternion
  8. Float X of the force vector
  9. Float Y of the force vector
  10. Float Z of the force vector
  11. Float X of the torque vector
  12. Float Y of the torque vector
  13. Float Z of the torque vector
  14. Float Unused
  15. Float X of the linear velocity vector
  16. Float Y of the linear velocity vector
  17. Float Z of the linear velocity vector
  18. Float X of the angular velocity vector
  19. Float Y of the angular velocity vector
  20. Float Z of the angular velocity vector
  21. Float Unused

EZNETWORK_SEND_JOINTAXIS 03

Refers to each of the possibly several axis of a Joint.

  1. Float displacement value of the axis (Relevant for the Slider Joint)
  2. Float angular velocity at the axis

EZNETWORK_SEND_JOINTFEEDBACK 04

The feedback can be used by the user, so that it is known how much force an individual joint exerts.

  1. Float X of the force vector of body 1
  2. Float Y of the force vector of body 1
  3. Float Z of the force vector of body 1
  4. Float X of the torque vector of body 1
  5. Float Y of the torque vector of body 1
  6. Float Z of the torque vector of body 1
  7. Float X of the force vector of body 2
  8. Float Y of the force vector of body 2
  9. Float Z of the force vector of body 2
  10. Float X of the torque vector of body 2
  11. Float Y of the torque vector of body 2
  12. Float Z of the torque vector of body 2

EZNETWORK_SEND_TIMESTAMP 05

Can be used to determine the current time of simulation.

  1. Long ODE step number (since the beginning of the simulation)
  2. Float ODE step size

Receive Packets

Receive Packets refers to the packets received in EZPhysics, which contain the control commands to apply in the simulation.

EZNETWORK_RECV_RESET 01

Commands the simulation to restart.

EZNETWORK_RECV_AXIS_FORCE 02

Represents a raw torque applied in an axis.

  1. Float torque value to apply to the axis 1 of a Joint
  2. Float torque value to apply to the axis 2 of a Joint (May be invalid)
  3. Float torque value to apply to the axis 3 of a Joint (May be invalid)

EZNETWORK_RECV_AXIS_MOTOR 03

Provides a common servo motor interface, target velocity and maximum torque.

  1. Float target velocity to apply on axis 1 of a Joint
  2. Float maximum torque imposed on axis 1 of a Joint
  3. Float target velocity to apply on axis 2 of a Joint (May be invalid)
  4. Float maximum torque imposed on axis 2 of a Joint (May be invalid)
  5. Float target velocity to apply on axis 3 of a Joint (May be invalid)
  6. Float maximum torque imposed on axis 3 of a Joint (May be invalid)
 
network_protocol.txt · Last modified: 2011/07/09 18:13 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki