This commit is contained in:
Pascal Serrarens 2025-04-07 09:46:23 +02:00
commit fe09a5695d
23 changed files with 335 additions and 483 deletions

View File

@ -1,105 +1,181 @@
warning: source 'images' is not a readable file or directory... skipping. warning: source 'images' is not a readable file or directory... skipping.
d:/Python/RoboidControl/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found d:/Python/RoboidControl-python/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' d:/Python/RoboidControl-python/Things/DifferentialDrive.py:46: warning: Found unknown command '@params'
d:/Python/RoboidControl/Things/DifferentialDrive.py:22: warning: Member SetDriveDimensions(self, wheel_diameter, wheel_separation) (function) of class DifferentialDrive.DifferentialDrive is not documented. d:/Python/RoboidControl-python/Things/DifferentialDrive.py:22: warning: Member SetDriveDimensions(self, wheel_diameter, wheel_separation) (function) of class DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/Things/DifferentialDrive.py:33: warning: Member SetMotors(self, wheel_left, wheel_right) (function) of class DifferentialDrive.DifferentialDrive is not documented. d:/Python/RoboidControl-python/Things/DifferentialDrive.py:33: warning: Member SetMotors(self, wheel_left, wheel_right) (function) of class DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' d:/Python/RoboidControl-python/Things/DifferentialDrive.py:46: warning: Found unknown command '@params'
d:/Python/RoboidControl/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found d:/Python/RoboidControl-python/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/Things/DifferentialDrive.py:31: warning: Member wheel_left (variable) of class DifferentialDrive.DifferentialDrive is not documented. d:/Python/RoboidControl-python/Things/DifferentialDrive.py:31: warning: Member wheel_left (variable) of class DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/Things/DifferentialDrive.py:31: warning: Member wheel_right (variable) of class DifferentialDrive.DifferentialDrive is not documented. d:/Python/RoboidControl-python/Things/DifferentialDrive.py:31: warning: Member wheel_right (variable) of class DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' d:/Python/RoboidControl-python/Things/DifferentialDrive.py:64: warning: Member angular_velocity_updated (variable) of class DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/Things/DifferentialDrive.py:47: warning: Found unknown command '@params' d:/Python/RoboidControl-python/Things/DifferentialDrive.py:46: warning: Found unknown command '@params'
d:/Python/RoboidControl/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found d:/Python/RoboidControl-python/Things/DifferentialDrive.py:47: warning: Found unknown command '@params'
d:/Python/RoboidControl/Things/DifferentialDrive.py:63: warning: @copydetails or @copydoc target 'Thing::Update' not found d:/Python/RoboidControl-python/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/LocalParticipant.py:76: warning: Member GetParticipant(self, ip_address, port) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/Things/DifferentialDrive.py:63: warning: @copydetails or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/LocalParticipant.py:86: warning: Member AddParticipant(self, ip_address, port) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:47: warning: Member FromVector3(Vector3 v) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:119: warning: Member SendThingInfo(self, owner, thing, bool recursively=False) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:77: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:129: warning: Member Send(self, owner, msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:105: warning: Member __repr__(self) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:138: warning: Member Publish(self, msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Direction.py:47: warning: Member FromVector3(Vector3 v) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:151: warning: Member Receiver(self) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Direction.py:77: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:163: warning: Member ReceiveData(self, data, sender) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Direction.py:105: warning: Member __repr__(self) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:183: warning: Member ProcessClientMsg(self, sender, ParticipantMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:75: warning: Member horizontal (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:186: warning: Member ProcessNetworkIdMsg(self, sender, NetworkIdMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:76: warning: Member vertical (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:196: warning: Member ProcessInvestigateMsg(self, bytearray data) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:108: warning: Member zero (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:199: warning: Member ProcessThingMsg(self, ThingMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:109: warning: Member forward (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:211: warning: Member ProcessNameMsg(self, NameMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:110: warning: Member backward (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:214: warning: Member ProcessModelUrlMsg(self, ModelUrlMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:111: warning: Member up (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:217: warning: Member ProcessBinary(self, BinaryMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:112: warning: Member down (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:223: warning: Member Register(self, constructor, thing_type) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:113: warning: Member left (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:226: warning: Member OnNewThing(self, event_handler) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:114: warning: Member right (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/LocalParticipant.py:229: warning: Member OnNewThingType(self, thing_type, event_handler) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:87: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:42: warning: Member local_port (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:94: warning: Member Magnitude(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:58: warning: Member thing_msg_processors (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:97: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:59: warning: Member new_thing_handlers (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:87: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:60: warning: Member publishInterval (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:94: warning: Member Magnitude(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:64: warning: Member udp_socket (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:97: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:105: warning: Member nextPublishMe (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:23: warning: Member direction (variable) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:144: warning: Member port (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:233: warning: Member zero (variable) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/LocalParticipant.py:29: warning: Member buffer (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:28: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Degrees(float distance, float degrees)
d:/Python/RoboidControl/LocalParticipant.py:32: warning: Member nextPublishMe (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:28: warning: The following parameter of LinearAlgebra.Spherical.Polar.Degrees(float distance, float degrees) is not documented:
d:/Python/RoboidControl/LocalParticipant.py:33: warning: Member others (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. parameter 'degrees'
d:/Python/RoboidControl/LocalParticipant.py:34: warning: Member thread (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:39: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Radians(float distance, float radians)
d:/Python/RoboidControl/LocalParticipant.py:35: warning: Member name (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:39: warning: argument 'vertical' of command @param is not found in the argument list of Polar::Radians(float distance, float radians)
d:/Python/RoboidControl/Messages/Messages.py:115: warning: Member __init__(self, network_id, thing) (function) of class RoboidControl.Messages.Messages.PoseMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:39: warning: The following parameter of LinearAlgebra.Spherical.Polar.Radians(float distance, float radians) is not documented:
d:/Python/RoboidControl/Messages/Messages.py:119: warning: Member Serialize(self, buffer_ref) (function) of class RoboidControl.Messages.Messages.PoseMsg is not documented. parameter 'radians'
d:/Python/RoboidControl/Messages/Messages.py:116: warning: Member network_id (variable) of class RoboidControl.Messages.Messages.PoseMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:78: warning: argument 'v' of command @param is not found in the argument list of Polar::__eq__(self, other)
d:/Python/RoboidControl/Messages/Messages.py:117: warning: Member thing (variable) of class RoboidControl.Messages.Messages.PoseMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:78: warning: The following parameter of LinearAlgebra.Spherical.Polar.__eq__(self, other) is not documented:
d:/Python/RoboidControl/Messages/NetworkIdMsg.py:7: warning: Member id (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented. parameter 'other'
d:/Python/RoboidControl/Messages/NetworkIdMsg.py:8: warning: Member length (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:28: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Degrees(float distance, float degrees)
d:/Python/RoboidControl/Messages/NetworkIdMsg.py:10: warning: Member network_id (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:28: warning: The following parameter of LinearAlgebra.Spherical.Polar.Degrees(float distance, float degrees) is not documented:
d:/Python/RoboidControl/Messages/ParticipantMsg.py:53: warning: Member SendTo(participant, network_id) (function) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. parameter 'degrees'
d:/Python/RoboidControl/Messages/ParticipantMsg.py:64: warning: Member Publish(participant, network_id) (function) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Radians(float distance, float radians)
d:/Python/RoboidControl/Messages/ParticipantMsg.py:41: warning: Member Serialized(buffer_ref, network_id) (function) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: argument 'vertical' of command @param is not found in the argument list of Polar::Radians(float distance, float radians)
d:/Python/RoboidControl/Messages/ParticipantMsg.py:21: warning: Member network_id (variable) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: The following parameter of LinearAlgebra.Spherical.Polar.Radians(float distance, float radians) is not documented:
d:/Python/RoboidControl/SiteServer.py:42: warning: Member AddParticipant(self, ip_address, port) (function) of class RoboidControl.SiteServer.SiteServer is not documented. parameter 'radians'
d:/Python/RoboidControl/SiteServer.py:49: warning: Member ProcessClientMsg(self, sender, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:78: warning: argument 'v' of command @param is not found in the argument list of Polar::__eq__(self, other)
d:/Python/RoboidControl/SiteServer.py:56: warning: Member ProcessNetworkId(self, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:78: warning: The following parameter of LinearAlgebra.Spherical.Polar.__eq__(self, other) is not documented:
d:/Python/RoboidControl/SiteServer.py:60: warning: Member Register(self, ThingClass, thing_type) (function) of class RoboidControl.SiteServer.SiteServer is not documented. parameter 'other'
d:/Python/RoboidControl/SiteServer.py:63: warning: Member Process(self, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:322: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:69: warning: Member ProcessThingMsg(self, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:328: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:20: warning: Member ip_address (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:440: warning: Member __repr__(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:21: warning: Member port (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:322: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:22: warning: Member publishInterval (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:328: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:23: warning: Member others (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:440: warning: Member __repr__(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:24: warning: Member network_id (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:252: warning: Member direction (variable) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:25: warning: Member buffer (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:443: warning: Member zero (variable) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/SiteServer.py:26: warning: Member thing_msg_constructors (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:313: warning: argument 'v' of command @param is not found in the argument list of Spherical::__eq__(self, other)
d:/Python/RoboidControl/SiteServer.py:29: warning: Member udp_socket (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:313: warning: The following parameter of LinearAlgebra.Spherical.Spherical.__eq__(self, other) is not documented:
d:/Python/RoboidControl/SiteServer.py:34: warning: Member thread (variable) of class RoboidControl.SiteServer.SiteServer is not documented. parameter 'other'
d:/Python/RoboidControl/SiteServer.py:14: warning: Member name (variable) of class RoboidControl.SiteServer.SiteServer is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:388: warning: argument 's1' of command @param is not found in the argument list of Spherical::Distance(v1, v2)
d:/Python/RoboidControl/SiteServer.py:18: warning: The following parameters of RoboidControl.SiteServer.SiteServer.__init__(self, port=7681, remote=False, udp_socket=None) are not documented: d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:388: warning: argument 's2' of command @param is not found in the argument list of Spherical::Distance(v1, v2)
parameter 'remote' d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:388: warning: The following parameters of LinearAlgebra.Spherical.Spherical.Distance(v1, v2) are not documented:
parameter 'udp_socket' parameter 'v1'
d:/Python/RoboidControl/Thing.py:92: warning: Member Update(self, currentTime) (function) of class RoboidControl.Thing.Thing is not documented. parameter 'v2'
d:/Python/RoboidControl/Thing.py:95: warning: Member ProcessBinary(self, data) (function) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:313: warning: argument 'v' of command @param is not found in the argument list of Spherical::__eq__(self, other)
d:/Python/RoboidControl/Thing.py:99: warning: Member SetParent(self, parent) (function) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:313: warning: The following parameter of LinearAlgebra.Spherical.Spherical.__eq__(self, other) is not documented:
d:/Python/RoboidControl/Thing.py:108: warning: Member AddChild(self, child) (function) of class RoboidControl.Thing.Thing is not documented. parameter 'other'
d:/Python/RoboidControl/Thing.py:115: warning: Member RemoveChild(self, child) (function) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: argument 's1' of command @param is not found in the argument list of Spherical::Distance(v1, v2)
d:/Python/RoboidControl/Thing.py:31: warning: Member children (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: argument 's2' of command @param is not found in the argument list of Spherical::Distance(v1, v2)
d:/Python/RoboidControl/Thing.py:61: warning: Member pose_updated (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: The following parameters of LinearAlgebra.Spherical.Spherical.Distance(v1, v2) are not documented:
d:/Python/RoboidControl/Thing.py:68: warning: Member position (variable) of class RoboidControl.Thing.Thing is not documented. parameter 'v1'
d:/Python/RoboidControl/Thing.py:69: warning: Member position_updated (variable) of class RoboidControl.Thing.Thing is not documented. parameter 'v2'
d:/Python/RoboidControl/Thing.py:75: warning: Member orientation (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:6: warning: Member __init__(self, Direction swing, Angle twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:76: warning: Member orientation_updated (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:65: warning: Member FromAngleAxis(Angle angle, Direction axis) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:82: warning: Member linear_velocity (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:82: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:83: warning: Member linear_velocity_updated (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:6: warning: Member __init__(self, Direction swing, Angle twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:89: warning: Member angular_velocity (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:65: warning: Member FromAngleAxis(Angle angle, Direction axis) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:90: warning: Member angular_velocity_updated (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:82: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:18: warning: Member Position (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:13: warning: Member Degrees(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:19: warning: Member Orientation (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:29: warning: Member Radians(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:20: warning: Member LinearVelocity (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:54: warning: Member FromQuaternion(Quaternion q) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:21: warning: Member AngularVelocity (variable) of class RoboidControl.Thing.Thing is not documented. d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:90: warning: Member Angle(r1, r2) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:80: warning: argument 'linearVelocity' of command @param is not found in the argument list of Thing::SetLinearVelocity(self, linear_velocity) d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:13: warning: Member Degrees(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/Thing.py:80: warning: The following parameter of RoboidControl.Thing.Thing.SetLinearVelocity(self, linear_velocity) is not documented: d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:29: warning: Member Radians(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:54: warning: Member FromQuaternion(Quaternion q) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:90: warning: Member Angle(r1, r2) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl-python/Messages/Messages.py:115: warning: Member __init__(self, network_id, thing) (function) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented.
d:/Python/RoboidControl-python/Messages/Messages.py:119: warning: Member Serialize(self, buffer_ref) (function) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented.
d:/Python/RoboidControl-python/Messages/Messages.py:116: warning: Member network_id (variable) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented.
d:/Python/RoboidControl-python/Messages/Messages.py:117: warning: Member thing (variable) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented.
d:/Python/RoboidControl-python/Messages/NetworkIdMsg.py:7: warning: Member id (variable) of class RoboidControl-python.Messages.NetworkIdMsg.NetworkIdMsg is not documented.
d:/Python/RoboidControl-python/Messages/NetworkIdMsg.py:8: warning: Member length (variable) of class RoboidControl-python.Messages.NetworkIdMsg.NetworkIdMsg is not documented.
d:/Python/RoboidControl-python/Messages/NetworkIdMsg.py:10: warning: Member network_id (variable) of class RoboidControl-python.Messages.NetworkIdMsg.NetworkIdMsg is not documented.
d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:53: warning: Member SendTo(participant, network_id) (function) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented.
d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:64: warning: Member Publish(participant, network_id) (function) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented.
d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:41: warning: Member Serialized(buffer_ref, network_id) (function) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented.
d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:21: warning: Member network_id (variable) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:71: warning: Member Isolated() (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:78: warning: Member GetParticipant(self, ip_address, port) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:88: warning: Member AddParticipant(self, ip_address, port) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:123: warning: Member SendThingInfo(self, owner, thing, bool recursively=False) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:135: warning: Member Send(self, owner, msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:144: warning: Member Publish(self, msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:157: warning: Member Receiver(self) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:169: warning: Member ReceiveData(self, data, sender) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:188: warning: Member ProcessParticipantMsg(self, sender, ParticipantMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:191: warning: Member ProcessNetworkIdMsg(self, sender, NetworkIdMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:201: warning: Member ProcessInvestigateMsg(self, bytearray data) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:204: warning: Member ProcessThingMsg(self, ThingMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:216: warning: Member ProcessNameMsg(self, NameMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:219: warning: Member ProcessModelUrlMsg(self, ModelUrlMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:222: warning: Member ProcessBinaryMsg(self, BinaryMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:228: warning: Member Register(self, constructor, thing_type) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:231: warning: Member OnNewThing(self, event_handler) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:234: warning: Member OnNewThingType(self, thing_type, event_handler) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:43: warning: Member local_port (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:61: warning: Member publishInterval (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:63: warning: Member udp_socket (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:109: warning: Member nextPublishMe (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:150: warning: Member port (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:29: warning: Member buffer (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:32: warning: Member nextPublishMe (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:34: warning: Member thread (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:35: warning: Member name (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/ParticipantUDP.py:36: warning: Member isolated_participant (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl-python/Thing.py:106: warning: Member Update(self, currentTime) (function) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:111: warning: Member ProcessBinary(self, data) (function) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:115: warning: Member SetParent(self, parent) (function) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:124: warning: Member AddChild(self, child) (function) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:131: warning: Member RemoveChild(self, child) (function) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:134: warning: Member GenerateBinary(self, buffer, ix_ref) (function) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:45: warning: Member children (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:75: warning: Member pose_updated (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:82: warning: Member position (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:83: warning: Member position_updated (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:89: warning: Member orientation (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:90: warning: Member orientation_updated (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:96: warning: Member linear_velocity (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:97: warning: Member linear_velocity_updated (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:103: warning: Member angular_velocity (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:104: warning: Member angular_velocity_updated (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:28: warning: Member Position (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:29: warning: Member Orientation (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:30: warning: Member LinearVelocity (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:31: warning: Member AngularVelocity (variable) of class RoboidControl-python.Thing.Thing is not documented.
d:/Python/RoboidControl-python/Thing.py:94: warning: argument 'linearVelocity' of command @param is not found in the argument list of Thing::SetLinearVelocity(self, linear_velocity)
d:/Python/RoboidControl-python/Thing.py:94: warning: The following parameter of RoboidControl-python.Thing.Thing.SetLinearVelocity(self, linear_velocity) is not documented:
parameter 'linear_velocity' parameter 'linear_velocity'
d:/Python/RoboidControl/Thing.py:87: warning: argument 'angularVelocity' of command @param is not found in the argument list of Thing::SetAngularVelocity(self, angular_velocity) d:/Python/RoboidControl-python/Thing.py:101: warning: argument 'angularVelocity' of command @param is not found in the argument list of Thing::SetAngularVelocity(self, angular_velocity)
d:/Python/RoboidControl/Thing.py:87: warning: The following parameter of RoboidControl.Thing.Thing.SetAngularVelocity(self, angular_velocity) is not documented: d:/Python/RoboidControl-python/Thing.py:101: warning: The following parameter of RoboidControl-python.Thing.Thing.SetAngularVelocity(self, angular_velocity) is not documented:
parameter 'angular_velocity' parameter 'angular_velocity'
d:/Python/RoboidControl/Thing.py:10: warning: Member Undetermined (variable) of class RoboidControl.Thing.Thing.Type is not documented. d:/Python/RoboidControl-python/Thing.py:11: warning: Member Undetermined (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/Thing.py:12: warning: Member Switch (variable) of class RoboidControl.Thing.Thing.Type is not documented. d:/Python/RoboidControl-python/Thing.py:13: warning: Member Switch (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/Thing.py:13: warning: Member DistanceSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented. d:/Python/RoboidControl-python/Thing.py:14: warning: Member DistanceSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/Thing.py:14: warning: Member DirectionalSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented. d:/Python/RoboidControl-python/Thing.py:15: warning: Member DirectionalSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/Thing.py:15: warning: Member TemperatureSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented. d:/Python/RoboidControl-python/Thing.py:16: warning: Member TemperatureSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/Thing.py:16: warning: Member Animator (variable) of class RoboidControl.Thing.Thing.Type is not documented. d:/Python/RoboidControl-python/Thing.py:17: warning: Member TouchSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/LinearAlgebra/SwingTwist.py:6: warning: Member __init__(self, Direction swing, float twist) (function) of class SwingTwist.SwingTwist is not documented. d:/Python/RoboidControl-python/Thing.py:19: warning: Member ControlledMotor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/LinearAlgebra/SwingTwist.py:18: warning: Member Degrees(float horizontal, float vertical, float twist) (function) of class SwingTwist.SwingTwist is not documented. d:/Python/RoboidControl-python/Thing.py:20: warning: Member UncontrolledMotor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl-python/Thing.py:21: warning: Member Servo (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl-python/Thing.py:23: warning: Member Roboid (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl-python/Thing.py:24: warning: Member Humanoid (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl-python/Thing.py:25: warning: Member ExternalSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl-python/Thing.py:26: warning: Member Animator (variable) of class RoboidControl-python.Thing.Thing.Type is not documented.
d:/Python/RoboidControl-python/Participants/SiteServer.py:44: warning: Member ProcessParticipantMsg(self, sender, msg) (function) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl-python/Participants/SiteServer.py:51: warning: Member ProcessNetworkId(self, msg) (function) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl-python/Participants/SiteServer.py:24: warning: Member isolated (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl-python/Participants/SiteServer.py:25: warning: Member remote_site (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl-python/Participants/SiteServer.py:32: warning: Member publishInterval (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl-python/Participants/SiteServer.py:14: warning: Member name (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl-python/README.md:12: warning: unable to resolve reference to 'RoboidControl::Thing::Thing' for \ref command
d:/Python/RoboidControl-python/README.md:13: warning: unable to resolve reference to 'RoboidControl::ParticipantUDP::ParticipantUDP' for \ref command

View File

@ -3,14 +3,14 @@ from os import path
sys.path.append(path.abspath(path.join(path.dirname(__file__), '..'))) sys.path.append(path.abspath(path.join(path.dirname(__file__), '..')))
import time import time
from LocalParticipant import LocalParticipant from ParticipantUDP import ParticipantUDP
from Thing import * from Thing import *
from Things.DifferentialDrive import DifferentialDrive from Things.DifferentialDrive import DifferentialDrive
from Things.TouchSensor import TouchSensor from Things.TouchSensor import TouchSensor
# Create a local participant for handling communcation # Create a local participant for handling communcation
# using default settings (UDP communciation over port 7681) # using default settings (UDP communciation over port 7681)
participant = LocalParticipant(port=7681, local_port=7682, ip_address="127.0.0.1") participant = ParticipantUDP(port=7681, local_port=7682, ip_address="127.0.0.1")
# The robot's propulsion is a differential drive # The robot's propulsion is a differential drive
bb2b = DifferentialDrive(participant) bb2b = DifferentialDrive(participant)
bb2b.name = "BB2B" bb2b.name = "BB2B"

View File

@ -6,17 +6,14 @@ class BinaryMsg():
def __init__(self, data, thing = None): def __init__(self, data, thing = None):
if isinstance(data, bytes): if isinstance(data, bytes):
self.network_id = data[1]
self.thing_id = data[2] self.thing_id = data[2]
#self.thing: Thing = Thing.Get(self.network_id, self.thing_id)
self.data = data[3:] self.data = data[3:]
else: else:
self.network_id = data
self.thing_id = thing.id self.thing_id = thing.id
self.thing = thing self.thing = thing
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
if self.network_id is None or self.thing_id is None: if self.thing_id is None:
return 0 return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
@ -26,23 +23,6 @@ class BinaryMsg():
return 0 return 0
buffer[0] = self.id buffer[0] = self.id
buffer[1] = self.network_id buffer[1] = 0 # network_id
buffer[2] = self.thing_id buffer[2] = self.thing_id
return ix return ix
# def SendTo(participant, thing, data: bytearray):
# length = 3
# if thing.network_id is None or thing is None or data is None:
# return False
# participant.buffer[0:length] = [
# BinaryMsg.id,
# participant.network_id,
# thing.id
# ]
# full_length = length + len(data)
# participant.buffer[length:full_length] = data
# participant.SendBuffer(full_length)
# return True

View File

@ -4,5 +4,4 @@ class InvestigateMsg():
length = 3 length = 3
def __init__(self, buffer): def __init__(self, buffer):
self.network_id = buffer[1]
self.thing_id = buffer[2] self.thing_id = buffer[2]

View File

@ -4,10 +4,10 @@ from LinearAlgebra.Angle import Angle
def SendAngle8(buffer, ix_ref, angle): def SendAngle8(buffer, ix_ref, angle):
"""! Send an 8-bit angle value """ """! Send an 8-bit angle value """
angle = Angle.Normalize(angle) # angle = Angle.Normalize(angle)
ix = ix_ref[0] ix = ix_ref[0]
buffer[ix] = int((angle / 360) * 256).to_bytes(1, 'big', signed=True)[0] buffer[ix] = int((angle.InDegrees() / 360) * 256).to_bytes(1, 'big', signed=True)[0]
ix_ref[0] += 1 ix_ref[0] += 1
def SendFloat16(buffer, ix_ref, value): def SendFloat16(buffer, ix_ref, value):

View File

@ -22,143 +22,69 @@ class IMessage:
return False return False
return participant.PublishBuffer(bufferSize) return participant.PublishBuffer(bufferSize)
# class ParticipantMsg(IMessage): # class InvestigateMsg():
# """! A participant messages notifies other participants of its presence. # id = 0x81
# length = 3
# When received by another participant, it can be followed by a NetworkIdMsg # def __init__(self, buffer):
# to announce that participant to this client such that it can join privately # self.thing_id = buffer[2]
# class PoseMsg(IMessage):
# """! Message to communicate the pose of the thing
# The pose is in local space relative to the parent.
# If there is not parent (the thing is a root thing), the pose will be in world space.
# """ # """
# ## The message ID # ## The message ID
# id: int = 0xA0 # id = 0x10
# ## The length of the message # ## The length of the message
# length: int = 2 # length = 4
# ## The network ID known by the participant.
# network_id: int = None
# def __init__(self, network_id: int): # def __init__(self, thing):
# """! Create a new message for sending # self.thing = thing
# @param network_id The network ID known by the participant. Use 0 if it is unknown
# """
# if isinstance(network_id, int):
# self.network_id = network_id
# elif isinstance(network_id, bytes):
# self.network_id = network_id[1]
# def Serialize(self, buffer_ref): # def Serialize(self, buffer_ref):
# """! Serialize the message into a byte array. # if self.thing is None:
# @param buffer_ref The buffer to serialize into
# @return The length of the message in the buffer
# """
# if buffer_ref is None or self.network_id is None:
# return 0 # return 0
# buffer: bytearray = buffer_ref[0] # buffer: bytearray = buffer_ref[0]
# buffer[0:ParticipantMsg.length] = [ # buffer[0:PoseMsg.length] = [
# ParticipantMsg.id, # PoseMsg.id,
# self.network_id # 0, # Network id
# self.thing.id,
# self.thing.pose_updated
# ] # ]
# return ParticipantMsg.length # ix = [4]
# if self.thing.pose_updated & Thing.Position:
# LowLevelMessages.SendSpherical(buffer, ix, self.thing.position)
# if self.thing.pose_updated & Thing.Orientation:
# LowLevelMessages.SendQuat32(buffer, ix, self.thing.orientation)
# if self.thing.pose_updated & Thing.LinearVelocity:
# LowLevelMessages.SendSpherical(buffer, ix, self.thing.linearVelocity)
# if self.thing.pose_updated & Thing.AngularVelocity:
# LowLevelMessages.SendSpherical(buffer, ix, self.thing.angularVelocity)
# return ix[0]
# ## A network id message invites another participant to a site # class BinaryMsg():
# # # id = 0xB1
# ## This can be sent in response to a ClientMsg
# class NetworkIdMsg(IMessage):
# id = 0xA1
# length = 2
# network_id = None # def __init__(self, buffer):
# self.thing_id = buffer[2]
# self.thing = Thing.Get(self.thing_id)
# self.data = buffer[3:]
# ## Create a network id message # def SendTo(participant, thing, data: bytearray):
# # # length = 3
# # @param network_id The network id assigned to the remote participant.
# def __init__(self, network_id):
# self.network_id = None
# if isinstance(network_id, int):
# self.network_id = network_id
# elif isinstance(network_id, bytes):
# self.network_id = network_id[1]
# ## Serialize the message into the given buffer # if thing is None or data is None:
# # # return False
# ## @param buffer_ref A reference to the buffer to use. This should be a list with the buffer as its first and only element
# ## @returns the length of the message
# def Serialize(self, buffer_ref):
# if self.network_id is None:
# return 0
# buffer: bytearray = buffer_ref[0] # participant.buffer[0:length] = [
# buffer[0:NetworkIdMsg.length] = [ # BinaryMsg.id,
# NetworkIdMsg.id, # 0, # network_id,
# self.network_id # thing.id
# ] # ]
# return NetworkIdMsg.length # full_length = length + len(data)
# participant.buffer[length:full_length] = data
class InvestigateMsg(): # participant.SendBuffer(full_length)
id = 0x81 # return True
length = 3
def __init__(self, buffer):
self.network_id = buffer[1]
self.thing_id = buffer[2]
class PoseMsg(IMessage):
"""! Message to communicate the pose of the thing
The pose is in local space relative to the parent.
If there is not parent (the thing is a root thing), the pose will be in world space.
"""
## The message ID
id = 0x10
## The length of the message
length = 4
def __init__(self, network_id, thing):
self.network_id = network_id
self.thing = thing
def Serialize(self, buffer_ref):
if (self.network_id is None) or (self.thing is None):
return 0
buffer: bytearray = buffer_ref[0]
buffer[0:PoseMsg.length] = [
PoseMsg.id,
self.network_id,
self.thing.id,
self.thing.pose_updated
]
ix = [4]
if self.thing.pose_updated & Thing.Position:
LowLevelMessages.SendSpherical(buffer, ix, self.thing.position)
if self.thing.pose_updated & Thing.Orientation:
LowLevelMessages.SendQuat32(buffer, ix, self.thing.orientation)
if self.thing.pose_updated & Thing.LinearVelocity:
LowLevelMessages.SendSpherical(buffer, ix, self.thing.linearVelocity)
if self.thing.pose_updated & Thing.AngularVelocity:
LowLevelMessages.SendSpherical(buffer, ix, self.thing.angularVelocity)
return ix[0]
class BinaryMsg():
id = 0xB1
def __init__(self, buffer):
self.network_id = buffer[1]
self.thing_id = buffer[2]
self.thing = Thing.Get(self.network_id, self.thing_id)
self.data = buffer[3:]
def SendTo(participant, thing, data: bytearray):
length = 3
if thing.network_id is None or thing is None or data is None:
return False
participant.buffer[0:length] = [
BinaryMsg.id,
participant.network_id,
thing.id
]
full_length = length + len(data)
participant.buffer[length:full_length] = data
participant.SendBuffer(full_length)
return True

View File

@ -4,24 +4,21 @@ class ModelUrlMsg(IMessage):
id = 0x90 id = 0x90
length = 4 length = 4
network_id = None
thing_id = None thing_id = None
url = None url = None
def __init__(self, data, thing = None): def __init__(self, data, thing = None):
if isinstance(data, bytes): if isinstance(data, bytes):
self.network_id = data[1]
self.thing_id = data[2] self.thing_id = data[2]
# model url length is not needed here # model url length is not needed here
self.url = data[ModelUrlMsg.length:].decode("utf-8") self.url = data[ModelUrlMsg.length:].decode("utf-8")
else: else:
self.network_id = data
if thing is not None: if thing is not None:
self.thing_id = thing.id self.thing_id = thing.id
self.url = thing.model_url self.url = thing.model_url
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
if self.network_id is None or self.thing_id is None or self.url is None: if self.thing_id is None or self.url is None:
return 0 return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
@ -34,7 +31,7 @@ class ModelUrlMsg(IMessage):
buffer[0:ModelUrlMsg.length] = [ buffer[0:ModelUrlMsg.length] = [
ModelUrlMsg.id, ModelUrlMsg.id,
self.network_id, 0, # network_id,
self.thing_id, self.thing_id,
url_length url_length
] ]

View File

@ -9,18 +9,16 @@ class NameMsg(IMessage):
def __init__(self, data, thing = None): def __init__(self, data, thing = None):
if isinstance(data, bytes): if isinstance(data, bytes):
self.network_id = data[1]
self.thing_id = data[2] self.thing_id = data[2]
# name_length is not needed here # name_length is not needed here
self.name = data[NameMsg.length:].decode("utf-8") self.name = data[NameMsg.length:].decode("utf-8")
else: else:
self.network_id = data
if thing is not None: if thing is not None:
self.thing_id = thing.id self.thing_id = thing.id
self.name = thing.name self.name = thing.name
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
if self.network_id is None or self.thing_id is None or self.name is None: if self.thing_id is None or self.name is None:
return 0 return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
@ -33,7 +31,7 @@ class NameMsg(IMessage):
buffer[0:NameMsg.length] = [ buffer[0:NameMsg.length] = [
NameMsg.id, NameMsg.id,
self.network_id, 0, #self.network_id,
self.thing_id, self.thing_id,
name_length name_length
] ]

View File

@ -7,30 +7,20 @@ class NetworkIdMsg(IMessage):
id = 0xA1 id = 0xA1
length = 2 length = 2
network_id = None
## Create a network id message ## Create a network id message
# def __init__(self, data = None):
# @param network_id The network id assigned to the remote participant. pass
def __init__(self, network_id):
self.network_id = None
if isinstance(network_id, int):
self.network_id = network_id
elif isinstance(network_id, bytes):
self.network_id = network_id[1]
## Serialize the message into the given buffer ## Serialize the message into the given buffer
# #
## @param buffer_ref A reference to the buffer to use. This should be a list with the buffer as its first and only element ## @param buffer_ref A reference to the buffer to use. This should be a list with the buffer as its first and only element
## @returns the length of the message ## @returns the length of the message
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
if self.network_id is None:
return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
buffer[0:NetworkIdMsg.length] = [ buffer[0:NetworkIdMsg.length] = [
NetworkIdMsg.id, NetworkIdMsg.id,
self.network_id 0
] ]
return NetworkIdMsg.length return NetworkIdMsg.length

View File

@ -10,63 +10,23 @@ class ParticipantMsg(IMessage):
id: int = 0xA0 id: int = 0xA0
## The length of the message ## The length of the message
length: int = 2 length: int = 2
## The network ID known by the participant.
network_id: int = None
def __init__(self, network_id: int): def __init__(self, data = None):
"""! Create a new message for sending """! Create a new message for sending
@param network_id The network ID known by the participant. Use 0 if it is unknown
""" """
if isinstance(network_id, int): pass
self.network_id = network_id
elif isinstance(network_id, bytes):
self.network_id = network_id[1]
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
"""! Serialize the message into a byte array. """! Serialize the message into a byte array.
@param buffer_ref The buffer to serialize into @param buffer_ref The buffer to serialize into
@return The length of the message in the buffer @return The length of the message in the buffer
""" """
if buffer_ref is None or self.network_id is None: if buffer_ref is None:
return 0 return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
buffer[0:ParticipantMsg.length] = [ buffer[0:ParticipantMsg.length] = [
ParticipantMsg.id, ParticipantMsg.id,
self.network_id 0, # network_id
] ]
return ParticipantMsg.length return ParticipantMsg.length
@staticmethod
def Serialized(buffer_ref, network_id):
if buffer_ref is None or network_id is None:
return 0
buffer: bytearray = buffer_ref[0]
buffer[0:ParticipantMsg.length] = [
ParticipantMsg.id,
network_id
]
return ParticipantMsg.length
# Send the network_id to the participant
def SendTo(participant, network_id):
if participant is None or network_id is None:
return False
participant.buffer[0:2] = [
ParticipantMsg.id,
network_id
]
participant.SendBuffer(ParticipantMsg.length)
# Publish the network_id
def Publish(participant, network_id):
if participant is None or network_id is None:
return False
participant.buffer[0:2] = [
ParticipantMsg.id,
network_id
]
participant.PublishBuffer(ParticipantMsg.length)

View File

@ -10,8 +10,7 @@ class PoseMsg():
LinearVelocity = 0x04 LinearVelocity = 0x04
AngularVelocity = 0x08 AngularVelocity = 0x08
def __init__(self, network_id, thing, force: bool = False): def __init__(self, thing, force: bool = False):
self.network_id = network_id
self.thing = thing self.thing = thing
self.pose_type = 0 self.pose_type = 0
if thing.position_updated or force: if thing.position_updated or force:
@ -28,13 +27,13 @@ class PoseMsg():
thing.angular_velocity_updated = False thing.angular_velocity_updated = False
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
if (self.network_id is None) or (self.thing is None) or (self.pose_type == 0): if self.thing is None or self.pose_type == 0:
return 0 return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
buffer[0:PoseMsg.length] = [ buffer[0:PoseMsg.length] = [
PoseMsg.id, PoseMsg.id,
self.network_id, 0, # network_id,
self.thing.id, self.thing.id,
self.pose_type self.pose_type
] ]

View File

@ -4,19 +4,16 @@ class ThingMsg(IMessage):
id = 0x80 id = 0x80
length = 5 length = 5
network_id = None
thing_id = None thing_id = None
thing_type = None thing_type = None
parent_id = None parent_id = None
def __init__(self, data, thing=None): def __init__(self, data, thing=None):
if isinstance(data, bytes): if isinstance(data, bytes):
self.network_id = data[1]
self.thing_id = data[2] self.thing_id = data[2]
self.thing_type = data[3] self.thing_type = data[3]
self.parent_id = data[4] self.parent_id = data[4]
else: else:
self.network_id = data
if thing is not None: if thing is not None:
self.thing_id = thing.id self.thing_id = thing.id
self.thing_type = thing.type self.thing_type = thing.type
@ -26,13 +23,13 @@ class ThingMsg(IMessage):
self.parent_id = 0 self.parent_id = 0
def Serialize(self, buffer_ref): def Serialize(self, buffer_ref):
if self.network_id is None or self.thing_id is None: if self.thing_id is None:
return 0 return 0
buffer: bytearray = buffer_ref[0] buffer: bytearray = buffer_ref[0]
buffer[0:ThingMsg.length] = [ buffer[0:ThingMsg.length] = [
ThingMsg.id, ThingMsg.id,
self.network_id, 0, # network_id,
self.thing_id, self.thing_id,
self.thing_type, self.thing_type,
self.parent_id self.parent_id

View File

@ -14,9 +14,6 @@ class Participant:
self.ip_address = ip_address self.ip_address = ip_address
## The port number for UDP communication with the participant. This is 0 for isolated participants. ## The port number for UDP communication with the participant. This is 0 for isolated participants.
self.port = port self.port = port
## The network Id to identify the participant.
## @note This field is likely to disappear in future versions
self.networkId = 0
## The things managed by this participant ## The things managed by this participant
self.things = set() self.things = set()
@ -30,23 +27,19 @@ class Participant:
thing.id = len(self.things) + 1 thing.id = len(self.things) + 1
self.things.add(thing) self.things.add(thing)
else: else:
found_thing = self.Get(thing.network_id, thing.id) found_thing = self.Get(thing.id)
if found_thing == None: if found_thing == None:
self.things.add(thing) self.things.add(thing)
def Get(self, network_id, thing_id): def Get(self, thing_id):
"""! Find a thing managed by this participant """! Find a thing managed by this participant
@param network_id The network ID for the thing
@param thing_id The ID of the thing @param thing_id The ID of the thing
@return The thing if found or nullptr when no thing has been found @return The thing if found or nullptr when no thing has been found
@note The use of the network ID is likely to disappear in future versions.
""" """
for thing in self.things: for thing in self.things:
if thing is not None: if thing is not None and thing.id == thing_id:
#if thing.network_id == network_id and thing.id == thing_id: return thing
if thing.id == thing_id:
return thing
return None return None
def Remove(self, thing): def Remove(self, thing):

View File

@ -17,7 +17,7 @@ micropython = 'micropython' in sys.modules
if micropython: if micropython:
from MicroPython.uPythonParticipant import Bla from MicroPython.uPythonParticipant import Bla
class LocalParticipant(Participant): class ParticipantUDP(Participant):
"""! A local participant is the local device which can communicate with other participants. """! A local participant is the local device which can communicate with other participants.
It manages all local things and communcation with other participants. Each application has a local participant which is usually explicit in the code. It manages all local things and communcation with other participants. Each application has a local participant which is usually explicit in the code.
@ -27,8 +27,6 @@ class LocalParticipant(Participant):
""" """
buffer = None buffer = None
## The network ID of the participant
network_id = None
nextPublishMe = 0 nextPublishMe = 0
others = None others = None
thread = None thread = None
@ -46,19 +44,17 @@ class LocalParticipant(Participant):
# Isolated participants do not communicate with other participants # Isolated participants do not communicate with other participants
self.isolated = True self.isolated = True
## The remote site when this participant is connected to a site ## The other participants communicating with this participant
self.remote_site = None self.others = []
if self.port != 0: if self.port != 0:
self.isolated = False self.isolated = False
if ip_address is not None: if ip_address is not None:
self.remote_site = Participant(ip_address, port) self.others.append(Participant(ip_address, port))
self.others = []
self.network_id = 0
self.buffer = bytearray(256) self.buffer = bytearray(256)
self.thing_msg_processors = {} # self.thing_msg_processors = {}
self.new_thing_handlers = [] # self.new_thing_handlers = []
self.publishInterval = 3000 # 3 seconds self.publishInterval = 3000 # 3 seconds
self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
@ -70,9 +66,9 @@ class LocalParticipant(Participant):
self.thread.start() self.thread.start()
def Isolated(): def Isolated():
if LocalParticipant.isolated_participant == None: if ParticipantUDP.isolated_participant == None:
LocalParticipant.isolated_participant = LocalParticipant(0) ParticipantUDP.isolated_participant = ParticipantUDP(0)
return LocalParticipant.isolated_participant return ParticipantUDP.isolated_participant
#region Update #region Update
@ -89,7 +85,6 @@ class LocalParticipant(Participant):
def AddParticipant(self, ip_address, port): def AddParticipant(self, ip_address, port):
print(f'{self.name} Add participant {ip_address} {port}') print(f'{self.name} Add participant {ip_address} {port}')
remote_participant = Participant(ip_address = ip_address, port = port) remote_participant = Participant(ip_address = ip_address, port = port)
remote_participant.network_id = len(self.others)
self.others.append(remote_participant) self.others.append(remote_participant)
return remote_participant return remote_participant
@ -99,20 +94,18 @@ class LocalParticipant(Participant):
if self.isolated == False: if self.isolated == False:
if self.publishInterval > 0 and currentTimeMs > self.nextPublishMe: if self.publishInterval > 0 and currentTimeMs > self.nextPublishMe:
msg = ParticipantMsg(self.network_id) msg = ParticipantMsg()
if self.remote_site is None: if self.others.count == 0:
self.Publish(msg) self.Publish(msg)
else: else:
self.Send(self.remote_site, msg) for other_participant in self.others:
self.Send(other_participant, msg)
print(f'Publish ParticipantMsg {self.network_id}') print(f'Publish ParticipantMsg')
self.nextPublishMe = currentTimeMs + self.publishInterval self.nextPublishMe = currentTimeMs + self.publishInterval
for thing in self.things: for thing in self.things:
thing.Update(currentTimeMs) thing.Update(currentTimeMs)
# pose_msg = PoseMsg(self.network_id, thing)
# for other in self.others:
# self.Send(other, pose_msg)
super().Update(currentTimeMs) super().Update(currentTimeMs)
@ -121,11 +114,11 @@ class LocalParticipant(Participant):
#region Send #region Send
def SendThingInfo(self, owner, thing, recursively: bool = False): def SendThingInfo(self, owner, thing, recursively: bool = False):
self.Send(owner, ThingMsg(self.network_id, thing)) self.Send(owner, ThingMsg(thing))
self.Send(owner, NameMsg(self.network_id, thing)) self.Send(owner, NameMsg(thing))
self.Send(owner, ModelUrlMsg(self.network_id, thing)) self.Send(owner, ModelUrlMsg(thing))
self.Send(owner, PoseMsg(self.network_id, thing, True)) self.Send(owner, PoseMsg(thing, True))
self.Send(owner, BinaryMsg(self.network_id, thing)) self.Send(owner, BinaryMsg(thing))
if recursively: if recursively:
for child in thing.children: for child in thing.children:
@ -189,29 +182,17 @@ class LocalParticipant(Participant):
pass pass
def ProcessNetworkIdMsg(self, sender, msg: NetworkIdMsg): def ProcessNetworkIdMsg(self, sender, msg: NetworkIdMsg):
print(f'{self.name} receive network id {self.network_id} -> {msg.network_id}') print(f'{self.name} receive network id')
if self.network_id != msg.network_id: print(f'sending all things {len(self.things)}')
self.network_id = msg.network_id for thing in self.things:
print(f'sending all things {len(self.things)}') if thing.parent is None:
for thing in self.things: self.SendThingInfo(sender, thing, recursively=True)
if thing.parent is None:
self.SendThingInfo(sender, thing, recursively=True)
# self.Send(NameMsg(self.network_id, thing))
def ProcessInvestigateMsg(self, data: bytearray): def ProcessInvestigateMsg(self, data: bytearray):
pass pass
def ProcessThingMsg(self, msg: ThingMsg): def ProcessThingMsg(self, msg: ThingMsg):
print(f'received thing {msg.network_id} {msg.thing_id}') print(f'received thing {msg.thing_id}')
if msg.thing_type in self.thing_msg_processors:
constructor = self.thing_msg_processors[msg.thing_type]
constructor(msg.network_id, msg.thing_id)
# not really 'new' thing, but it is a start
thing = Thing.Get(msg.network_id, msg.thing_id)
if thing is not None:
for handler in self.new_thing_handlers:
handler(thing)
def ProcessNameMsg(self, msg: NameMsg): def ProcessNameMsg(self, msg: NameMsg):
print(f'received name {msg.name}') print(f'received name {msg.name}')
@ -221,20 +202,8 @@ class LocalParticipant(Participant):
def ProcessBinaryMsg(self, msg: BinaryMsg): def ProcessBinaryMsg(self, msg: BinaryMsg):
# print('received binary data') # print('received binary data')
thing: Thing = self.Get(msg.network_id, msg.thing_id) thing: Thing = self.Get(msg.thing_id)
if thing != None: if thing != None:
thing.ProcessBinary(msg.data) thing.ProcessBinary(msg.data)
def Register(self, constructor, thing_type):
self.thing_msg_processors[thing_type] = constructor
def OnNewThing(self, event_handler):
self.new_thing_handlers.append(event_handler)
def OnNewThingType(self, thing_type, event_handler):
def ConditionalHandler(thing):
if thing.type == thing_type:
event_handler(thing)
self.new_thing_handlers.append(ConditionalHandler)
#endregion #endregion

View File

@ -0,0 +1,29 @@
from ParticipantUDP import ParticipantUDP
from Messages.ParticipantMsg import ParticipantMsg
from Messages.NetworkIdMsg import NetworkIdMsg
from Things.TemperatureSensor import TemperatureSensor
from Thing import Thing
import socket
import threading
class SiteServer(ParticipantUDP):
"""! A site server is a participant which provides a shared simulated environment
"""
name = "Site Server"
def __init__(self, port=7681):
"""! Create a new site server
@param port The UDP port on which communication is received
"""
super().__init__(ip_address = "127.0.0.1", port = port)
self.isolated = False # site servers are never isolated
self.publishInterval = 0
def ProcessParticipantMsg(self, sender, msg):
print(f'{self.name} received Participant ')
self.Send(sender, NetworkIdMsg())
def ProcessNetworkId(self, msg):
pass

View File

@ -9,7 +9,5 @@ Supporting:
# Basic components # Basic components
- \ref RoboidControl::Thing::Thing "Thing" - \ref RoboidControl::Thing::Thing "Thing"
- \ref RoboidControl::LocalParticipant::LocalParticipant "LocalParticipant" - \ref RoboidControl::ParticipantUDP::ParticipantUDP "ParticipantUDP"
- \ref RoboidControl::SiteServer::SiteServer "SiteServer"

View File

@ -1,52 +0,0 @@
from LocalParticipant import LocalParticipant
from Messages.ParticipantMsg import ParticipantMsg
from Messages.NetworkIdMsg import NetworkIdMsg
from Things.TemperatureSensor import TemperatureSensor
from Thing import Thing
import socket
import threading
class SiteServer(LocalParticipant):
"""! A site server is a participant which provides a shared simulated environment
"""
name = "Site Server"
def __init__(self, port=7681):
"""! Create a new site server
@param port The UDP port on which communication is received
"""
super().__init__(ip_address = "127.0.0.1", port = port)
# self.ip_address = "0.0.0.0"
# self.port = port
# self.local_port = port
self.isolated = False # site servers are never isolated
self.remote_site = None # site servers never have remote sites
# self.others = []
# self.network_id = 0
# self.buffer = bytearray(256)
# self.thing_msg_processors = {}
# self.new_thing_handlers = []
self.publishInterval = 0
# self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# self.udp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
# self.udp_socket.bind(("0.0.0.0", self.local_port))
# self.thread = threading.Thread(target = self.Receiver)
# self.thread.daemon = True
# self.thread.start()
self.Register(TemperatureSensor, Thing.Type.TemperatureSensor)
def ProcessParticipantMsg(self, sender, msg):
if msg.network_id == 0:
print(f'{self.name} received New Client -> {sender.network_id}')
self.Send(sender, NetworkIdMsg(sender.network_id))
# else:
# print(f'{self.name} Client')
def ProcessNetworkId(self, msg):
pass

View File

@ -30,7 +30,7 @@ class Thing:
LinearVelocity = 0x04 LinearVelocity = 0x04
AngularVelocity = 0x08 AngularVelocity = 0x08
def __init__(self, owner = None, network_id = 0, thing_id = 0, type = Type.Undetermined, parent = None, name = None): def __init__(self, owner = None, thing_id = 0, type = Type.Undetermined, parent = None, name = None):
"""! Create a new thing """ """! Create a new thing """
## The parent thing ## The parent thing
@ -39,16 +39,13 @@ class Thing:
owner = parent.owner owner = parent.owner
self.SetParent(parent) self.SetParent(parent)
elif owner == None: elif owner == None:
from LocalParticipant import LocalParticipant from ParticipantUDP import ParticipantUDP
owner = LocalParticipant.Isolated() owner = ParticipantUDP.Isolated()
self.children = [] self.children = []
## The participant owning this thing ## The participant owning this thing
self.owner = owner self.owner = owner
## The network ID of this thing
## @note This field will likely disappear in future versions
self.network_id = network_id
## The ID of the thing ## The ID of the thing
self.id = thing_id self.id = thing_id
## The type of the thing ## The type of the thing
@ -104,14 +101,10 @@ class Thing:
self.angular_velocity_updated = True self.angular_velocity_updated = True
def Update(self, currentTime): def Update(self, currentTime):
pose_msg = PoseMsg(self.network_id, self) pose_msg = PoseMsg(self)
for other in self.owner.others: for other in self.owner.others:
self.owner.Send(other, pose_msg) self.owner.Send(other, pose_msg)
def ProcessBinary(self, data):
print('default binary processor')
pass
def SetParent(self, parent): def SetParent(self, parent):
if parent is None: if parent is None:
parentThing = self.parent parentThing = self.parent
@ -133,3 +126,7 @@ class Thing:
def GenerateBinary(self, buffer, ix_ref): def GenerateBinary(self, buffer, ix_ref):
pass pass
def ProcessBinary(self, data):
print('default binary processor')
pass

View File

@ -65,13 +65,14 @@ class DifferentialDrive(Thing):
# This assumes no sideward velocity because diff drive does not support it # This assumes no sideward velocity because diff drive does not support it
linear_speed = self.linear_velocity.distance linear_speed = self.linear_velocity.distance
# When the direction is backwards... # When the direction is backwards...
if self.linear_velocity.direction.horizontal < -90 or self.linear_velocity.direction.horizontal > 90: horizontalAngle = self.linear_velocity.direction.horizontal.InDegrees()
if horizontalAngle < -90 or horizontalAngle > 90:
linear_speed = -linear_speed linear_speed = -linear_speed
angular_velocity: Spherical = self.angular_velocity angular_velocity: Spherical = self.angular_velocity
angular_speed: float = angular_velocity.distance * Angle.Deg2Rad # in radians/sec angular_speed: float = angular_velocity.distance * Angle.Deg2Rad # in radians/sec
# Determine the rotation direction # Determine the rotation direction
if angular_velocity.direction.horizontal < 0: if angular_velocity.direction.horizontal.InDegrees() < 0:
angular_speed = -angular_speed angular_speed = -angular_speed
if self.wheel_left is not None and self.wheel_right is not None: if self.wheel_left is not None and self.wheel_right is not None:

View File

@ -2,8 +2,8 @@ from Thing import Thing
from Messages import LowLevelMessages from Messages import LowLevelMessages
class TemperatureSensor(Thing): class TemperatureSensor(Thing):
def __init__(self, network_id, thing_id): def __init__(self, thing_id):
super().__init__(network_id, thing_id, type = Thing.Type.TemperatureSensor) super().__init__(thing_id, type = Thing.Type.TemperatureSensor)
self.temp = 0 self.temp = 0
self._watchers = [] self._watchers = []

View File

@ -1,10 +1,5 @@
__all__ = ['Thing', __all__ = ['Thing',
'LocalParticipant', 'ParticipantUDP']
'SiteServer']
from .LinearAlgebra.Direction import Direction from .ParticipantUDP import ParticipantUDP
from .LocalParticipant import LocalParticipant
from .Thing import Thing from .Thing import Thing
from .LinearAlgebra.Spherical import Spherical
from .LinearAlgebra.SwingTwist import SwingTwist
from .SiteServer import SiteServer

View File

@ -4,8 +4,8 @@ from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parent.parent)) sys.path.append(str(Path(__file__).resolve().parent.parent))
import time import time
from SiteServer import SiteServer from Participants.SiteServer import SiteServer
from LocalParticipant import LocalParticipant from ParticipantUDP import ParticipantUDP
from Thing import * from Thing import *
from Things.DifferentialDrive import DifferentialDrive from Things.DifferentialDrive import DifferentialDrive
from Things.TouchSensor import TouchSensor from Things.TouchSensor import TouchSensor
@ -15,7 +15,7 @@ site = SiteServer(port=7691)
# Create a local participant for handling communcation # Create a local participant for handling communcation
# using default settings (UDP communciation over port 7681) # using default settings (UDP communciation over port 7681)
participant = LocalParticipant(port=7691, local_port=7683, ip_address="127.0.0.1") participant = ParticipantUDP(port=7691, local_port=7683, ip_address="127.0.0.1")
# The robot's propulsion is a differential drive # The robot's propulsion is a differential drive
bb2b = DifferentialDrive(participant) bb2b = DifferentialDrive(participant)
bb2b.name = "BB2B" bb2b.name = "BB2B"

View File

@ -8,13 +8,13 @@ sys.path.append(str(Path(__file__).resolve().parent.parent))
import unittest import unittest
from Thing import Thing from Thing import Thing
from LocalParticipant import LocalParticipant from ParticipantUDP import ParticipantUDP
from SiteServer import SiteServer from Participants.SiteServer import SiteServer
class ThingTest(unittest.TestCase): class ThingTest(unittest.TestCase):
def test_participant(self): def test_participant(self):
participant: LocalParticipant = LocalParticipant() participant: ParticipantUDP = ParticipantUDP()
milliseconds = time.time() * 1000 milliseconds = time.time() * 1000
start_time = milliseconds start_time = milliseconds
@ -33,7 +33,7 @@ class ThingTest(unittest.TestCase):
def test_site_participant(self): def test_site_participant(self):
site = SiteServer(port=7681) site = SiteServer(port=7681)
participant = LocalParticipant(port=7681, ip_address="127.0.0.1", local_port=7682) participant = ParticipantUDP(port=7681, ip_address="127.0.0.1", local_port=7682)
milliseconds = time.time() * 1000 milliseconds = time.time() * 1000
start_time = milliseconds start_time = milliseconds
@ -46,7 +46,7 @@ class ThingTest(unittest.TestCase):
def test_thing_msg(self): def test_thing_msg(self):
site = SiteServer() site = SiteServer()
participant = LocalParticipant(ip_address="127.0.0.1", port=7683) participant = ParticipantUDP(ip_address="127.0.0.1", port=7683)
thing = Thing() thing = Thing()
thing.name = "First thing" thing.name = "First thing"
thing.model_url = "https://passer.life/extras/ant.jpg" thing.model_url = "https://passer.life/extras/ant.jpg"