Compare commits

...

11 Commits

15 changed files with 171 additions and 322 deletions

View File

@ -1,223 +0,0 @@
warning: source 'images' is not a readable file or directory... skipping.
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:77: warning: @copybrief or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:61: warning: Found unknown command '@params'
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:47: warning: Member FromVector3(Vector3 v) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:100: warning: Member __repr__(self) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/LinearAlgebra/Direction.py:47: warning: Member FromVector3(Vector3 v) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Direction.py:105: warning: Member __repr__(self) (function) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:75: warning: Member horizontal (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:76: warning: Member vertical (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:103: warning: Member zero (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:104: warning: Member forward (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:105: warning: Member backward (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:106: warning: Member up (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:107: warning: Member down (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:108: warning: Member left (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:109: warning: Member right (variable) of class LinearAlgebra.Direction.Direction is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:87: warning: Member Magnitude(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:90: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:94: warning: Member Magnitude(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:97: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:22: warning: Member direction (variable) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:226: warning: Member zero (variable) of class LinearAlgebra.Spherical.Polar is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:27: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Degrees(float distance, float degrees)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:27: warning: The following parameter of LinearAlgebra.Spherical.Polar.Degrees(float distance, float degrees) is not documented:
parameter 'degrees'
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:38: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Radians(float distance, float radians)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:38: warning: argument 'vertical' of command @param is not found in the argument list of Polar::Radians(float distance, float radians)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:38: warning: The following parameter of LinearAlgebra.Spherical.Polar.Radians(float distance, float radians) is not documented:
parameter 'radians'
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:77: warning: argument 'v' of command @param is not found in the argument list of Polar::__eq__(self, other)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:77: warning: The following parameter of LinearAlgebra.Spherical.Polar.__eq__(self, other) is not documented:
parameter 'other'
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:28: warning: The following parameter of LinearAlgebra.Spherical.Polar.Degrees(float distance, float degrees) is not documented:
parameter 'degrees'
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: The following parameter of LinearAlgebra.Spherical.Polar.Radians(float distance, float radians) is not documented:
parameter 'radians'
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:78: warning: The following parameter of LinearAlgebra.Spherical.Polar.__eq__(self, other) is not documented:
parameter 'other'
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:316: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:428: warning: Member __repr__(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:328: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:440: warning: Member __repr__(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:245: warning: Member direction (variable) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:431: warning: Member zero (variable) of class LinearAlgebra.Spherical.Spherical is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:306: warning: argument 'v' of command @param is not found in the argument list of Spherical::__eq__(self, other)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:306: warning: The following parameter of LinearAlgebra.Spherical.Spherical.__eq__(self, other) is not documented:
parameter 'other'
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:376: warning: argument 's1' of command @param is not found in the argument list of Spherical::Distance(v1, v2)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:376: warning: argument 's2' of command @param is not found in the argument list of Spherical::Distance(v1, v2)
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:376: warning: The following parameters of LinearAlgebra.Spherical.Spherical.Distance(v1, v2) are not documented:
parameter 'v1'
parameter 'v2'
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:313: warning: The following parameter of LinearAlgebra.Spherical.Spherical.__eq__(self, other) is not documented:
parameter 'other'
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: The following parameters of LinearAlgebra.Spherical.Spherical.Distance(v1, v2) are not documented:
parameter 'v1'
parameter 'v2'
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/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/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/SwingTwist.py:65: warning: Member FromAngleAxis(Angle angle, Direction axis) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/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/RoboidControl/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/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:54: warning: Member FromQuaternion(Quaternion q) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:84: warning: Member Angle(r1, r2) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/RoboidControl/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/RoboidControl/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/RoboidControl/LinearAlgebra/LinearAlgebra/SwingTwist.py:54: warning: Member FromQuaternion(Quaternion q) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/RoboidControl/LinearAlgebra/LinearAlgebra/SwingTwist.py:90: warning: Member Angle(r1, r2) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:114: warning: Member UpdateMyThings(self, int currentTimeMs) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:141: warning: Member SendThingInfo(self, Participant owner, 'Thing' thing, bool recursively=False) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:152: warning: Member PublishThingInfo(self, Thing thing) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:159: warning: Member Send(self, Participant owner, IMessage msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:168: warning: Member Publish(self, IMessage msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:181: warning: Member Receiver(self) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:197: warning: Member ReceiveData(self, bytes data, Participant sender) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:218: warning: Member ProcessParticipantMsg(self, Participant sender, ParticipantMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:221: warning: Member ProcessSiteIdMsg(self, Participant sender, NetworkIdMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:229: warning: Member ProcessInvestigateMsg(self, Participant sender, InvestigateMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:232: warning: Member ProcessThingMsg(self, Participant sender, ThingMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:235: warning: Member ProcessNameMsg(self, Participant sender, NameMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:248: warning: Member ProcessModelUrlMsg(self, Participant sender, ModelUrlMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:251: warning: Member ProcessPoseMsg(self, Participant sender, PoseMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:271: warning: Member ProcessBinaryMsg(self, Participant sender, BinaryMsg msg) (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:85: warning: Member Isolated() (function) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:68: warning: Member is_isolated (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:70: warning: Member remote_site (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:76: warning: Member udp_socket (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:78: warning: Member port (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:80: warning: Member thread (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:108: warning: Member nextPublishMe (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:125: warning: Member network_id (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:43: warning: Member name (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:92: warning: Member isolated_participant (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:112: warning: Member nextPublishMe (variable) of class ParticipantUDP.ParticipantUDP is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:52: warning: argument 'ipAddress' of command @param is not found in the argument list of ParticipantUDP::__init__(self, int port=7681, Optional[str] ip_address=None, int local_port=7681)
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:52: warning: argument 'localPort' of command @param is not found in the argument list of ParticipantUDP::__init__(self, int port=7681, Optional[str] ip_address=None, int local_port=7681)
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:52: warning: The following parameters of ParticipantUDP.ParticipantUDP.__init__(self, int port=7681, Optional[str] ip_address=None, int local_port=7681) are not documented:
parameter 'ip_address'
parameter 'local_port'
d:/Python/RoboidControl/RoboidControl/Participants/ParticipantUDP.py:96: warning: argument 'The' of command @param is not found in the argument list of ParticipantUDP::Update(self, Optional[int] currentTimeMs=None) inherited from member Update at line 63 in file d:/Python/RoboidControl/RoboidControl/Participant.py
d:/Python/RoboidControl/RoboidControl/Participant.py:63: warning: The following parameter of ParticipantUDP.ParticipantUDP.Update(self, Optional[int] currentTimeMs=None) is not documented:
parameter 'currentTimeMs'
d:/Python/RoboidControl/RoboidControl/Messages/DestroyMsg.py:26: warning: Member network_id (variable) of class RoboidControl.Messages.DestroyMsg.DestroyMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/DestroyMsg.py:27: warning: Member thing_id (variable) of class RoboidControl.Messages.DestroyMsg.DestroyMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/IMessage.py:9: warning: argument 'ref_buffer' of command @param is not found in the argument list of IMessage::Serialize(self, list[bytearray] buffer_ref)
d:/Python/RoboidControl/RoboidControl/Messages/IMessage.py:9: warning: The following parameter of RoboidControl.Messages.IMessage.IMessage.Serialize(self, list[bytearray] buffer_ref) is not documented:
parameter 'buffer_ref'
d:/Python/RoboidControl/RoboidControl/Messages/InvestigateMsg.py:44: warning: Member network_id (variable) of class RoboidControl.Messages.InvestigateMsg.InvestigateMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/ModelUrlMsg.py:49: warning: argument 'ref_buffer' of command @param is not found in the argument list of ModelUrlMsg::Serialize(self, list[bytearray] buffer_ref)
d:/Python/RoboidControl/RoboidControl/Messages/ModelUrlMsg.py:49: warning: The following parameter of RoboidControl.Messages.ModelUrlMsg.ModelUrlMsg.Serialize(self, list[bytearray] buffer_ref) is not documented:
parameter 'buffer_ref'
d:/Python/RoboidControl/RoboidControl/Messages/NetworkIdMsg.py:23: warning: Member network_id (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/NetworkIdMsg.py:30: warning: argument 'ref_buffer' of command @param is not found in the argument list of NetworkIdMsg::Serialize(self, list[bytearray] buffer_ref)
d:/Python/RoboidControl/RoboidControl/Messages/NetworkIdMsg.py:30: warning: The following parameter of RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg.Serialize(self, list[bytearray] buffer_ref) is not documented:
parameter 'buffer_ref'
d:/Python/RoboidControl/RoboidControl/Messages/ParticipantMsg.py:19: warning: Member network_id (variable) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/PoseMsg.py:60: warning: Member position (variable) of class RoboidControl.Messages.PoseMsg.PoseMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/PoseMsg.py:62: warning: Member orientation (variable) of class RoboidControl.Messages.PoseMsg.PoseMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/PoseMsg.py:64: warning: Member linear_velocity (variable) of class RoboidControl.Messages.PoseMsg.PoseMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/PoseMsg.py:66: warning: Member angular_velocity (variable) of class RoboidControl.Messages.PoseMsg.PoseMsg is not documented.
d:/Python/RoboidControl/RoboidControl/Messages/PoseMsg.py:87: warning: argument 'ref_buffer' of command @param is not found in the argument list of PoseMsg::Serialize(self, buffer_ref)
d:/Python/RoboidControl/RoboidControl/Messages/PoseMsg.py:87: warning: The following parameter of RoboidControl.Messages.PoseMsg.PoseMsg.Serialize(self, buffer_ref) is not documented:
parameter 'buffer_ref'
d:/Python/RoboidControl/RoboidControl/Messages/TextMsg.py:37: warning: argument 'ref_buffer' of command @param is not found in the argument list of TextMsg::Serialize(self, buffer_ref)
d:/Python/RoboidControl/RoboidControl/Messages/TextMsg.py:37: warning: The following parameter of RoboidControl.Messages.TextMsg.TextMsg.Serialize(self, buffer_ref) is not documented:
parameter 'buffer_ref'
d:/Python/RoboidControl/RoboidControl/Messages/ThingMsg.py:49: warning: argument 'ref_buffer' of command @param is not found in the argument list of ThingMsg::Serialize(self, list[bytearray] buffer_ref)
d:/Python/RoboidControl/RoboidControl/Messages/ThingMsg.py:49: warning: The following parameter of RoboidControl.Messages.ThingMsg.ThingMsg.Serialize(self, list[bytearray] buffer_ref) is not documented:
parameter 'buffer_ref'
d:/Python/RoboidControl/RoboidControl/Participant.py:65: warning: Member things (variable) of class RoboidControl.Participant.Participant is not documented.
d:/Python/RoboidControl/RoboidControl/Participant.py:68: warning: Member participants (variable) of class RoboidControl.Participant.Participant is not documented.
d:/Python/RoboidControl/RoboidControl/Participant.py:63: warning: argument 'The' of command @param is not found in the argument list of Participant::Update(self, int currentTimeMs=0)
d:/Python/RoboidControl/RoboidControl/Participant.py:63: warning: The following parameter of RoboidControl.Participant.Participant.Update(self, int currentTimeMs=0) is not documented:
parameter 'currentTimeMs'
d:/Python/RoboidControl/RoboidControl/Thing.py:57: warning: Member owner (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:111: warning: Member parent (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:170: warning: Member position (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:171: warning: Member position_updated (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:177: warning: Member orientation (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:178: warning: Member orientation_updated (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:185: warning: Member linear_velocity_updated (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:187: warning: Member linear_velocity (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:194: warning: Member angular_velocity_updated (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:196: warning: Member angular_velocity (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:31: warning: Member Position (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:32: warning: Member Orientation (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:33: warning: Member LinearVelocity (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:34: warning: Member AngularVelocity (variable) of class RoboidControl.Thing.Thing is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:40: warning: argument 'thingId' of command @param is not found in the argument list of Thing::__init__(self, Optional[ 'Participant'] owner=None, Optional[ 'Thing'] parent=None, int thing_type=Type.Undetermined, int thing_id=0)
d:/Python/RoboidControl/RoboidControl/Thing.py:40: warning: The following parameter of RoboidControl.Thing.Thing.__init__(self, Optional[ 'Participant'] owner=None, Optional[ 'Thing'] parent=None, int thing_type=Type.Undetermined, int thing_id=0) is not documented:
parameter 'thing_id'
d:/Python/RoboidControl/RoboidControl/Thing.py:104: warning: argument 'The' of command @param is not found in the argument list of Thing::SetParent(self, Optional[ 'Thing'] parent)
d:/Python/RoboidControl/RoboidControl/Thing.py:104: warning: The following parameter of RoboidControl.Thing.Thing.SetParent(self, Optional[ 'Thing'] parent) is not documented:
parameter 'parent'
d:/Python/RoboidControl/RoboidControl/Thing.py:135: warning: argument 'id' of command @param is not found in the argument list of Thing::GetChild(self, int thing_id, bool recurse=False)
d:/Python/RoboidControl/RoboidControl/Thing.py:135: warning: The following parameter of RoboidControl.Thing.Thing.GetChild(self, int thing_id, bool recurse=False) is not documented:
parameter 'thing_id'
d:/Python/RoboidControl/RoboidControl/Thing.py:182: warning: argument 'linearVelocity' of command @param is not found in the argument list of Thing::SetLinearVelocity(self, Spherical linear_velocity)
d:/Python/RoboidControl/RoboidControl/Thing.py:182: warning: The following parameter of RoboidControl.Thing.Thing.SetLinearVelocity(self, Spherical linear_velocity) is not documented:
parameter 'linear_velocity'
d:/Python/RoboidControl/RoboidControl/Thing.py:191: warning: argument 'angularVelocity' of command @param is not found in the argument list of Thing::SetAngularVelocity(self, Spherical angular_velocity)
d:/Python/RoboidControl/RoboidControl/Thing.py:191: warning: The following parameter of RoboidControl.Thing.Thing.SetAngularVelocity(self, Spherical angular_velocity) is not documented:
parameter 'angular_velocity'
d:/Python/RoboidControl/RoboidControl/Thing.py:227: warning: argument 'buffer' of command @param is not found in the argument list of Thing::GenerateBinary(self, bytearray bytes, set[int] ix_ref)
d:/Python/RoboidControl/RoboidControl/Thing.py:227: warning: The following parameter of RoboidControl.Thing.Thing.GenerateBinary(self, bytearray bytes, set[int] ix_ref) is not documented:
parameter 'bytes'
d:/Python/RoboidControl/RoboidControl/Thing.py:235: warning: argument 'bytes' of command @param is not found in the argument list of Thing::ProcessBinary(self, bytes data)
d:/Python/RoboidControl/RoboidControl/Thing.py:235: warning: The following parameter of RoboidControl.Thing.Thing.ProcessBinary(self, bytes data) is not documented:
parameter 'data'
d:/Python/RoboidControl/RoboidControl/Thing.py:13: warning: Member Undetermined (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:15: warning: Member Switch (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:16: warning: Member DistanceSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:17: warning: Member DirectionalSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:18: warning: Member TemperatureSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:19: warning: Member TouchSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:21: warning: Member ControlledMotor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:22: warning: Member UncontrolledMotor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:23: warning: Member Servo (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:25: warning: Member Roboid (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:26: warning: Member Humanoid (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:27: warning: Member ExternalSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:28: warning: Member Animator (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Thing.py:29: warning: Member DifferentialDrive (variable) of class RoboidControl.Thing.Thing.Type is not documented.
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:76: warning: unable to resolve link to 'https://en.wikipedia.org/wiki/Differential_wheeled_robot' for \link command
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:61: warning: Found unknown command '@params'
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:77: warning: @copybrief or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:42: warning: Member wheel_left (variable) of class RoboidControl.Things.DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:42: warning: Member wheel_right (variable) of class RoboidControl.Things.DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:79: warning: Member angular_velocity_updated (variable) of class RoboidControl.Things.DifferentialDrive.DifferentialDrive is not documented.
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:27: warning: argument 'wheelDiameter' of command @param is not found in the argument list of DifferentialDrive::SetDriveDimensions(self, wheel_diameter, wheel_separation)
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:27: warning: argument 'wheelSeparation' of command @param is not found in the argument list of DifferentialDrive::SetDriveDimensions(self, wheel_diameter, wheel_separation)
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:27: warning: The following parameters of RoboidControl.Things.DifferentialDrive.DifferentialDrive.SetDriveDimensions(self, wheel_diameter, wheel_separation) are not documented:
parameter 'wheel_diameter'
parameter 'wheel_separation'
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:46: warning: argument 'leftWheel' of command @param is not found in the argument list of DifferentialDrive::SetMotors(self, wheel_left, wheel_right)
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:46: warning: argument 'rightWheel' of command @param is not found in the argument list of DifferentialDrive::SetMotors(self, wheel_left, wheel_right)
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:46: warning: The following parameters of RoboidControl.Things.DifferentialDrive.DifferentialDrive.SetMotors(self, wheel_left, wheel_right) are not documented:
parameter 'wheel_left'
parameter 'wheel_right'
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:61: warning: Found unknown command '@params'
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:62: warning: Found unknown command '@params'
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:77: warning: @copybrief or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/RoboidControl/Things/DifferentialDrive.py:78: warning: @copydetails or @copydoc target 'Thing::Update' not found
d:/Python/RoboidControl/RoboidControl/Things/TemperatureSensor.py:7: warning: argument 'thingId' of command @param is not found in the argument list of TemperatureSensor::__init__(self, owner=None, parent=None, thing_type=0) inherited from member __init__ at line 40 in file d:/Python/RoboidControl/RoboidControl/Thing.py
d:/Python/RoboidControl/RoboidControl/Participants/SiteServer.py:33: warning: Member ProcessParticipantMsg(self, sender, msg) (function) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/SiteServer.py:38: warning: Member ProcessNetworkIdMsg(self, sender, msg) (function) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/SiteServer.py:41: warning: Member ProcessThingMsg(self, sender, ThingMsg msg) (function) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/SiteServer.py:23: warning: Member isolated (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/SiteServer.py:24: warning: Member publishInterval (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl/RoboidControl/Participants/SiteServer.py:14: warning: Member name (variable) of class SiteServer.SiteServer is not documented.
d:/Python/RoboidControl/README.md:13: warning: unable to resolve reference to 'RoboidControl::ParticipantUDP::ParticipantUDP' for \ref command

View File

@ -61,7 +61,7 @@ PROJECT_BRIEF =
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
# the logo to the output directory.
PROJECT_LOGO = //intranet/home/Afbeeldingen/PasserVR/Logos/Logo3NameRight100.png
PROJECT_LOGO = //intranet/home/Afbeeldingen/PasserVR/Logos/PasserLife/PasserLifeLogoLeft_300.png
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
# into which the generated documentation will be written. If a relative path is

View File

@ -8,8 +8,18 @@ Supporting:
# Install
- Go to the root folder of this repository (the folder containing this `README.md` and `setup.py`)
- Execute the command.
You can install the package directly from the git server using pip:
```
pip install git+https://git.passer.life/RoboidControl/RoboidControl-python.git
```
If you want to use a specific branch, you can use
```
pip install git+https://git.passer.life/RoboidControl/RoboidControl-python.git@v0.4_dev
```
Alternatively you can clone the repo to a folder in you project.
Then you can install it by going to the root folder of the repository (the folder containing this `README.md` and `setup.py`)
and execute the command.
```
pip install .
```

View File

@ -28,4 +28,4 @@ while True:
# Update the roboid state
bb2b.Update(True)
# and sleep for 100ms
time.sleep(100)
time.sleep(0.100)

View File

@ -4,12 +4,12 @@ from LinearAlgebra.Spherical import Spherical
from LinearAlgebra.Quaternion import Quaternion
from LinearAlgebra.Angle import Angle
def SendSpherical(buffer, ix_ref, vector):
def SendSpherical(buffer, ref_ix, vector: Spherical):
"""! Send a spherical vector
"""
SendFloat16(buffer, ix_ref, vector.distance)
SendAngle8(buffer, ix_ref, vector.direction.horizontal)
SendAngle8(buffer, ix_ref, vector.direction.vertical)
SendFloat16(buffer, ref_ix, vector.distance)
SendAngle8(buffer, ref_ix, vector.direction.horizontal)
SendAngle8(buffer, ref_ix, vector.direction.vertical)
def ReceiveSpherical(buffer: bytes, ref_ix: list[int]) -> Spherical:
"""! Receive a spherical vector
"""
@ -19,6 +19,19 @@ def ReceiveSpherical(buffer: bytes, ref_ix: list[int]) -> Spherical:
v: Spherical = Spherical.Degrees(distance, horizontal, vertical)
return v
def SendSwingTwist(buffer, ref_ix, orientation: SwingTwist):
"""! Send a swing/twist orientation
"""
SendAngle8(buffer, ref_ix, orientation.swing.horizontal)
SendAngle8(buffer, ref_ix, orientation.swing.vertical)
SendAngle8(buffer, ref_ix, orientation.twist)
def ReceiveSwingTwist(buffer, ref_ix) -> SwingTwist:
horizontal = ReceiveAngle8(buffer, ref_ix)
vertical = ReceiveAngle8(buffer, ref_ix)
twist = ReceiveAngle8(buffer, ref_ix)
orientation: SwingTwist = SwingTwist.Degrees(horizontal, vertical, twist)
return orientation
def SendQuat32(buffer, ref_ix, q):
"""! Send a 32-bit quaternion value """
if isinstance(q, SwingTwist):

View File

@ -59,7 +59,7 @@ class PoseMsg(IMessage):
if self.pose_type & PoseMsg.Pose_Position != 0:
self.position = LowLevelMessages.ReceiveSpherical(buffer, ix_ref)
if self.pose_type & PoseMsg.Pose_Orientation != 0:
self.orientation = LowLevelMessages.ReceiveQuaternion(buffer, ix_ref)
self.orientation = LowLevelMessages.ReceiveSwingTwist(buffer, ix_ref)
if self.pose_type & PoseMsg.Pose_LinearVelocity != 0:
self.linear_velocity = LowLevelMessages.ReceiveSpherical(buffer, ix_ref)
if self.pose_type & PoseMsg.Pose_AngularVelocity != 0:
@ -101,9 +101,9 @@ class PoseMsg(IMessage):
if self.pose_type & PoseMsg.Pose_Position:
LowLevelMessages.SendSpherical(buffer, ix, self.thing.position)
if self.pose_type & PoseMsg.Pose_Orientation:
LowLevelMessages.SendQuat32(buffer, ix, self.thing.orientation)
LowLevelMessages.SendSwingTwist(buffer, ix, self.thing.orientation)
if self.pose_type & PoseMsg.Pose_LinearVelocity:
LowLevelMessages.SendSpherical(buffer, ix, self.thing.linear_velocity)
if self.pose_type & PoseMsg.Pose_AngularVelocity:
LowLevelMessages.SendSpherical(buffer, ix, self.thing.angular_velocity)
return PoseMsg.length + ix[0]
return ix[0]

View File

@ -1,4 +1,4 @@
from RoboidControl.Thing import Thing
#from RoboidControl.Thing import Thing
from typing import Union, Optional
@ -11,7 +11,11 @@ class Participant:
It is used as a basis for the local participant, but also as a reference to remote participants.
"""
def __init__(self, ip_address: str, port: int) -> None:
# region Init
local_participant: 'Participant' = None
def __init__(self, ip_address: str = None, port: int = None, local_participant: 'Participant' = None) -> None:
"""! Create a new participant with the given communcation info
@param ip_address The IP address of the participant
@param port The UDP port of the participant
@ -22,15 +26,28 @@ class Participant:
## The port number for UDP communication with the participant. This is 0 for isolated participants.
self.port: int = port
self.udp_socket = None
if local_participant is not None:
self.udp_socket = local_participant.udp_socket
## he network Id to identify the participant.
self.network_id: int = 0
## The things managed by this participant
self.things: set[Thing] = set()
self.things: set['Thing'] = set()
self.root: Thing = Thing.CreateRoot(self)
from RoboidControl.Thing import Thing
Thing.CreateRoot(self)
def Get(self, thing_id: int) -> Optional[Thing]:
self.buffer: bytearray = bytearray(256)
def GetLocalParticipant():
return Participant.local_participant
def ReplaceLocalParticipant(newParticipant: 'Participant'):
Participant.localParticipant = newParticipant
def Get(self, thing_id: int) -> Optional['Thing']:
"""! Get the thing with the given properties
@param thing_id The ID of the thing
@ -41,7 +58,7 @@ class Participant:
return thing
return None
def Add(self, thing: Thing, check_id: bool = True):
def Add(self, thing: 'Thing', check_id: bool = True):
"""! Add a new thing for this participant.
@param thing The thing to add
@param check_id If true, the thing.id is regenerated if it is zero
@ -54,7 +71,7 @@ class Participant:
if found_thing == None:
self.things.add(thing)
def Remove(self, thing: Thing) -> None:
def Remove(self, thing: 'Thing') -> None:
"""! Remove a thing for this participant
@param thing The thing to remove
"""
@ -67,6 +84,33 @@ class Participant:
for thing in list(self.things):
thing.Update(currentTimeMs)
# endregion Init
# region Update
def Update(self):
"""! Update all things for this participant
"""
for thing in self.things:
thing.Update(True)
# endregion Update
# region Send
def Send(self, msg) -> bool:
buffer_size = msg.Serialize([self.buffer])
if buffer_size <= 0:
return True
# print(f'{self.name} send {self.buffer[0]} to {owner.ip_address} {owner.port}')
self.udp_socket.sendto(self.buffer[:buffer_size], (self.ip_address, self.port))
return True
# endregion Send
# region Participant Registry
participants: set['Participant'] = set()
@staticmethod
@ -90,7 +134,7 @@ class Participant:
return participant
return None
def AddParticipant(arg1: Union[str, 'Participant'], port: Optional[int] = None) -> 'Participant':
def AddParticipant(arg1: Union[str, 'Participant'], port: Optional[int] = None, local_participant: 'Participant' = None) -> 'Participant':
"""! Add a participant
@param arg1 Either:
- str: The IP address of the participant
@ -99,13 +143,17 @@ class Participant:
"""
if port is not None:
ip_address = str(arg1)
participant = Participant(ip_address, port)
participant = Participant(ip_address, port, local_participant)
participant.network_id = len(Participant.participants) + 1
Participant.AddParticipant(participant)
return participant
else:
participant: Participant = arg1
foundParticipant = Participant.GetParticipant(participant.network_id, participant.port)
if foundParticipant is not None:
if foundParticipant is None:
Participant.participants.add(participant)
return participant
# endergion Participant Registry
Participant.local_participant = Participant()

View File

@ -43,6 +43,7 @@ class ParticipantUDP(Participant):
name = "Participant"
#region Init
def __init__(self,
port: int = 7681,
ip_address: Optional[str] = None,
@ -64,46 +65,47 @@ class ParticipantUDP(Participant):
## The interval in milliseconds for publishing (broadcasting) data on the local network
self.publishInterval = 3000 # 3 seconds
if port != 0:
self.is_isolated = False
if ip_address is not None:
self.remote_site = Participant(ip_address, port)
Participant.AddParticipant(self)
self.buffer: bytearray = bytearray(256)
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.port))
self.udp_socket.bind(("0.0.0.0", local_port))
if port != 0:
self.is_isolated = False
if ip_address is not None:
self.remote_site = Participant(ip_address, port, self)
self.thread = threading.Thread(target = self.Receiver)
self.thread.daemon = True
self.thread.start()
@staticmethod
def Isolated() -> 'ParticipantUDP':
if ParticipantUDP.isolated_participant == None:
ParticipantUDP.isolated_participant = ParticipantUDP(0)
return ParticipantUDP.isolated_participant
Participant.AddParticipant(self)
Participant.ReplaceLocalParticipant(self)
# @staticmethod
# def Isolated() -> 'ParticipantUDP':
# if ParticipantUDP.isolated_participant == None:
# ParticipantUDP.isolated_participant = ParticipantUDP(0)
# return ParticipantUDP.isolated_participant
#endregion Init
isolated_participant = None
# isolated_participant = None
#region Update
def Update(self, currentTimeMs: Optional[int] = None):
if currentTimeMs is None:
def Update(self):
currentTimeMs = int(time.time() * 1000)
# Send periodic ParticipantMsg
if self.is_isolated == False:
if self.publishInterval > 0 and currentTimeMs > self.nextPublishMe:
msg = ParticipantMsg(self.network_id)
if self.remote_site == None:
self.Publish(msg)
else:
self.Send(self.remote_site, msg)
self.remote_site.Send(msg)
self.nextPublishMe = currentTimeMs + self.publishInterval
@ -113,24 +115,11 @@ class ParticipantUDP(Participant):
def UpdateMyThings(self, currentTimeMs: int):
for thing in self.things:
# if thing.hierarchyChanged and not (self.isIsolated or self.network_id == ):
# thingMsg = ThingMsg(self.network_id, thing)
# self.Send(self.remote_site, thingMsg)
if thing.owner is not None:
poseMsg = PoseMsg(thing.owner.network_id, thing)
if self.remote_site is not None:
self.Send(self.remote_site, poseMsg)
thing.Update(currentTimeMs, False)
thing.Update(False)
if not(self.is_isolated or self.network_id == 0):
if thing.terminate:
destroyMsg = DestroyMsg.Create(self.network_id, thing)
self.Send(self.remote_site, destroyMsg)
else:
if self.remote_site is not None and thing.owner is not None:
# Send to remote site
self.Send(self.remote_site, PoseMsg(thing.owner.network_id, thing))
self.Send(self.remote_site, BinaryMsg(thing.owner.network_id, thing))
self.remote_site.Send(destroyMsg)
if thing.terminate:
self.Remove(thing)
@ -139,11 +128,11 @@ class ParticipantUDP(Participant):
#region Send
def SendThingInfo(self, owner: Participant, thing: 'Thing', recursively: bool = False):
self.Send(owner, ThingMsg(self.network_id, thing))
self.Send(owner, NameMsg(self.network_id, thing))
self.Send(owner, ModelUrlMsg(self.network_id, thing))
self.Send(owner, PoseMsg(self.network_id, thing, True))
self.Send(owner, BinaryMsg(self.network_id, thing))
owner.Send(ThingMsg(self.network_id, thing))
owner.Send(NameMsg(self.network_id, thing))
owner.Send(ModelUrlMsg(self.network_id, thing))
owner.Send(PoseMsg(self.network_id, thing, True))
owner.Send(BinaryMsg(self.network_id, thing))
if recursively:
for child in thing.children:
@ -156,14 +145,9 @@ class ParticipantUDP(Participant):
self.Publish(PoseMsg(self.network_id, thing))
self.Publish(BinaryMsg(self.network_id, thing))
def Send(self, owner: Participant, msg: IMessage):
buffer_size = msg.Serialize([self.buffer])
if buffer_size <= 0:
return True
# print(f'{self.name} send {self.buffer[0]} to {owner.ip_address} {owner.port}')
self.udp_socket.sendto(self.buffer[:buffer_size], (owner.ip_address, owner.port))
return True
def Send(self, msg):
if self.remote_site is not None:
self.remote_site.Send(msg)
def Publish(self, msg: IMessage):
buffer_size = msg.Serialize([self.buffer])
@ -188,7 +172,7 @@ class ParticipantUDP(Participant):
remote_participant = Participant.GetParticipant(remote_ip_address, remote_port)
if remote_participant is None:
# print(f'new participant')
remote_participant = Participant.AddParticipant(remote_ip_address, remote_port)
remote_participant = Participant.AddParticipant(remote_ip_address, remote_port, self)
self.ReceiveData(data, remote_participant)
except ConnectionError:
self.network_id = 0

View File

@ -22,7 +22,7 @@ class SiteServer(ParticipantUDP):
"""! Create a new site server
@param port The port of which to receive the messages
"""
super().__init__(local_port = port)
super().__init__(port = port, local_port = port)
self.isolated = False # site servers are never isolated
self.publishInterval = 0

View File

View File

@ -1,6 +1,6 @@
#from RoboidControl.Participant import Participant
from LinearAlgebra.Spherical import Spherical
from LinearAlgebra.Quaternion import Quaternion
from LinearAlgebra.SwingTwist import SwingTwist
from typing import Optional
import time
@ -43,7 +43,9 @@ class Thing:
@param parent The parent thing (will override owner if set)
"""
## The participant owning this thing
self.owner: Optional['Participant'] = None
#self.owner: Optional['Participant'] = None
## The ID of the thing
self.id: int = 0
## The type of the thing
@ -53,14 +55,6 @@ class Thing:
## The parent of this thing
self.parent: Optional[Thing] = None
if parent is not None:
self.owner = parent.owner
self.SetParent(parent)
elif owner == None:
from RoboidControl.Participants.ParticipantUDP import ParticipantUDP
self.owner = ParticipantUDP.Isolated()
else:
self.owner = owner
## The children of this thing
self.children: list[Thing] = list()
@ -70,13 +64,31 @@ class Thing:
## An URL pointing to the location where a model of the thing can be found
self.model_url: Optional[str] = None
if owner is not None:
# When owner is set, this will be a root thing
self.type = Thing.Type.Root
self.name = "Root"
## The participant owning this thing
self.owner = owner
# self.owner.Add(self) missing????
else:
if parent is None:
from RoboidControl.Participant import Participant
self.SetParent(Participant.local_participant.root)
else:
self.SetParent(parent)
## The participant owning this thing
self.owner = self.parent.owner
## The position of the thing in local space, in meters
self.position: Spherical = Spherical.zero
## Boolean indicating that the thing has an updated position
self.position_updated: bool = False
## The orientation of the thing in local space
self.orientation: Quaternion = Quaternion.identity
self.orientation: SwingTwist = SwingTwist.identity
## Boolean indicating the thing has an updated orientation
self.orientation_updated: bool = False
@ -96,8 +108,12 @@ class Thing:
self.owner.Add(self)
@staticmethod
def CreateRoot(owner):
return Thing(owner = owner)
def CreateRoot(owner: 'Participant'):
owner.root = Thing(owner = owner)
# def LocalRoot() -> 'Thing':
# participant = Participant.GetLocalParticipant()
# return participant.root
# endregion Init
@ -174,7 +190,7 @@ class Thing:
self.position = position
self.position_updated = True
def SetOrientation(self, orientation: Quaternion) -> None:
def SetOrientation(self, orientation: SwingTwist) -> None:
"""! Set the orientation of the thing
@param orientation The new orientation in local space
"""
@ -210,7 +226,7 @@ class Thing:
"""
return int(time.time() * 1000)
def Update(self, currentTimeMs: int = 0, recurse: bool = False) -> None:
def Update(self, recurse: bool = False) -> None:
"""! Update de state of the thing
@param currentTimeMs The current clock time in milliseconds; If this is zero, the current time is retrieved automatically
@param recurse When true, this will Update the descendants recursively
@ -222,7 +238,7 @@ class Thing:
if recurse:
for child in self.children:
child.Update(currentTimeMs, recurse)
child.Update(recurse)
# endregion Update

View File

@ -7,10 +7,10 @@ class DifferentialDrive(Thing):
"""! A thing which can move itself using a differential drive system
@sa @link https://en.wikipedia.org/wiki/Differential_wheeled_robot @endlink
"""
def __init__(self, owner = None, parent = None, thing_id = 0):
def __init__(self, owner = None, parent = None):
"""! Create a differential drive
"""
super().__init__(owner = owner, parent = parent, thing_type = Thing.Type.DifferentialDrive, thing_id = thing_id)
super().__init__(owner = owner, parent = parent)
## The radius of a wheel in meters
self.wheel_radius = 1.0

View File

@ -6,8 +6,8 @@ class TouchSensor(Thing):
def __init__(self, owner = None, parent = None, thing_id = 0):
"""! Create a touch sensor
"""
super().__init__(owner = owner, parent = parent, thing_type = Thing.Type.TouchSensor, thing_id = thing_id)
super().__init__(owner = owner, parent = parent)
self.type = Thing.Type.TouchSensor
## Value which is true when the sensor is touching something, false otherwise
self.touched_something = False

View File

@ -2,9 +2,10 @@ from setuptools import setup, find_packages
setup(
name='RoboidControl',
version='0.3.0',
version='0.4.0-dev',
packages=find_packages(),
install_requires=['LinearAlgebra @ git+https://git.passer.life/LinearAlgebra/LinearAlgebra-python.git@main#egg=LinearAlgebra'],
install_requires=['LinearAlgebra @ git+https://git.passer.life/LinearAlgebra/LinearAlgebra-python.git@main#egg=LinearAlgebra',
'numpy'],
author='Passer Life',
author_email='support@passer.life',
description='Control lightweight networked robots',

View File

@ -20,7 +20,7 @@ class ThingTest(unittest.TestCase):
start_time = milliseconds
while milliseconds < start_time + 5000:
milliseconds = time.time() * 1000
participant.Update(milliseconds)
participant.Update()
def test_site_server(self):
site = SiteServer(port=7681)
@ -29,7 +29,7 @@ class ThingTest(unittest.TestCase):
start_time = milliseconds
while milliseconds < start_time + 5000:
milliseconds = time.time() * 1000
site.Update(milliseconds)
site.Update()
def test_site_participant(self):
site = SiteServer(port=7681)
@ -39,8 +39,8 @@ class ThingTest(unittest.TestCase):
start_time = milliseconds
while milliseconds < start_time + 7000:
milliseconds = time.time() * 1000
site.Update(milliseconds)
participant.Update(milliseconds)
site.Update()
participant.Update()
time.sleep(0.1)
def test_thing_msg(self):
@ -55,8 +55,8 @@ class ThingTest(unittest.TestCase):
start_time = milliseconds
while milliseconds < start_time + 7000:
milliseconds = time.time() * 1000
site.Update(milliseconds)
participant.Update(milliseconds)
site.Update()
participant.Update()
if __name__ == '__main__':
unittest.main()