Agents
For a higher level description of the agents, see HoloOcean Agents.
Definitions for different agents that can be controlled from HoloOcean
Classes:
|
Represents information needed to initialize agent. |
Creates an agent object |
|
|
An implementation of the BlueROV2 Heavy vehicle from Blue Robotics. |
All allowed control schemes. |
|
|
CougUV is based off the torpedo, a simple foward motion autonomous underwater vehicle. |
|
Fixed Wing Agent |
|
A learning agent in HoloOcean |
|
A simple autonomous underwater vehicle. |
|
A simple husky vehicle. |
|
A copy of HoveringAUV with scuba diver mesh. |
|
A basic sphere robot. |
|
A simple surface vessel. |
|
A simple foward motion autonomous underwater vehicle. |
|
A simple turtle bot. |
|
A UAV (quadcopter) agent |
- class holoocean.agents.AgentDefinition(agent_name, agent_type, sensors=None, starting_loc=(0, 0, 0), starting_rot=(0, 0, 0), existing=False, is_main_agent=False)
Represents information needed to initialize agent.
- Parameters:
agent_name (
str) – The name of the agent to control.agent_type (
stror type) – The type of HoloOceanAgent to control, string or class reference.sensors (
SensorDefinitionor class type (if no duplicate sensors)) – A list of HoloOceanSensors to read from this agent.starting_loc (
listoffloat) – Starting[x, y, z]location for agent (see Coordinate System)starting_rot (
listoffloat) – Starting[roll, pitch, yaw]rotation for agent (see Rotations)existing (
bool) – If the agent exists in the world or not (deprecated)
- class holoocean.agents.AgentFactory
Creates an agent object
Methods:
build_agent(client, agent_def)Constructs an agent
- static build_agent(client, agent_def)
Constructs an agent
- Parameters:
client (
holoocean.holooceanclient.HoloOceanClient) – HoloOceanClient agent is associated withagent_def (
AgentDefinition) – Definition of the agent to instantiate
Returns:
- class holoocean.agents.BlueROV2(client, name='DefaultAgent')
An implementation of the BlueROV2 Heavy vehicle from Blue Robotics.
Action Space Has three possible control schemes, as follows #. Thruster Forces:
[Vertical Front Starboard, Vertical Front Port, Vertical Back Port, Vertical Back Starboard, Angled Front Starboard, Angled Front Port, Angled Back Port, Angled Back Starboard]#. PID Controller:[des_pos_x, des_pos_y, des_pos_z, roll, pitch, yaw]#. Accelerations, in global frame:[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]Inherits fromHoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation. Instructions for implemeting parameters for Thor Fossen dynamics are given in the corresponding fossen dynamics documentation.
- Variables:
mass – (
float): Mass of the vehicle in kg.water_density – (
float): Water density in kg / m^3.volume – (
float): Volume of vehicle in m^3.cob – (
np.ndarray): 3-vecter Center of buoyancy from the center of mass in m.I – (
np.ndarray): 3x3 Inertia matrix.thruster_d – (
np.ndarray): 8x3 matrix of unit vectors in the direction of thruster propulsionthruster_p – (
np.ndarray): 8x3 matrix of positions in local frame of thrusters positions in m.
Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.ControlSchemes
All allowed control schemes.
- ANDROID_TORQUES
Default Android control scheme. Specify a torque for each joint.
- Type:
int
- CONTINUOUS_SPHERE_DEFAULT
Default ContinuousSphere control scheme. Takes two commands, [forward_delta, turn_delta].
- Type:
int
- DISCRETE_SPHERE_DEFAULT
Default DiscreteSphere control scheme. Takes a value, 0-4, which corresponds with forward, backward, right, and left.
- Type:
int
- NAV_TARGET_LOCATION
Default NavAgent control scheme. Takes a target xyz coordinate.
- Type:
int
- UAV_TORQUES
Default UAV control scheme. Takes torques for roll, pitch, and yaw, as well as thrust.
- Type:
int
- UAV_ROLL_PITCH_YAW_RATE_ALT
Control scheme for UAV. Takes roll, pitch, yaw rate, and altitude targets.
- Type:
int
- HAND_AGENT_MAX_TORQUES
Default Android control scheme. Specify a torque for each joint.
- Type:
int
- AUV_THRUSTERS
Default HoveringAUV control scheme. Specify 8-vector of forces for each thruster.
- Type:
int
- AUV_CONTROL
Implemented PD controller. Specify 6-vector of position and roll,pitch,yaw to go too.
- Type:
int
- AUV_FORCES
Used for custom dynamics. All internal dynamics (except collisions) are turned off including buoyancy, gravity, and damping. Specify 6-vector of linear and angular acceleration in the global frame.
- Type:
int
- TAUV_FINS
Default TorpedoAUV control scheme. Specify 5-vector of fin rotations in degrees and propeller value in Newtons.
- Type:
int
- TAUV_FORCES
Used for custom dynamics. All internal dynamics (except collisions) are turned off including buoyancy, gravity, and damping. Specify 6-vector of linear and angular acceleration in the global frame.
- Type:
int
- SV_THRUSTERS
Default SurfaceVessel control scheme. Specify 2-vector of forces for left and right thruster.
- Type:
int
- SV_CONTROL
Implemented PD controller. Specify 2-vector of x and y position to go too.
- Type:
int
- SV_FORCES
Used for custom dynamics. All internal dynamics (except collisions) are turned off including buoyancy, gravity, and damping. Specify 6-vector of linear and angular acceleration in the global frame.
- Type:
int
- class holoocean.agents.CougUV(client, name='DefaultAgent')
CougUV is based off the torpedo, a simple foward motion autonomous underwater vehicle.
Action Space
Has two possible action spaces, as follows:
Fins & Propeller:
[left_fin, top_fin, right_fin, bottom_fin, thrust]Accelerations, in global frame:
[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]
Inherits from
HoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation. Instructions for implemeting parameters for Thor Fossen dynamics are given in the corresponding fossen dynamics documentation.
- Variables:
mass – (
float): Mass of the vehicle in kg.water_density – (
float): Water density in kg / m^3.volume – (
float): Volume of vehicle in m^3.cob – (
np.ndarray): 3-vecter Center of buoyancy from the center of mass in m.I – (
np.ndarray): 3x3 Inertia matrix.thruster_p – (
np.ndarray): 3 matrix of positions in local frame of propeller position in m.fin_p – (
np.ndarray): 4x3 matrix of positions in local frame of fin positions in m.
Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.FixedWing(client, name='DefaultAgent')
Fixed Wing Agent
This agent is a WIP and is currently just a copy of the Hovering AUV agent. It is not yet ready for public use.
Action Space
Has three possible control schemes, as follows
Thruster Forces:
[Vertical Front Starboard, Vertical Front Port, Vertical Back Port, Vertical Back Starboard, Angled Front Starboard, Angled Front Port, Angled Back Port, Angled Back Starboard]PD Controller:
[des_pos_x, des_pos_y, des_pos_z, roll, pitch, yaw]Accelerations, in global frame:
[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]
Inherits from
HoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation. Instructions for implemeting parameters for Thor Fossen dynamics are given in the corresponding fossen dynamics documentation.
The following parameters are defined in the C++ code and are not used in the python code. They are provided here for convenience in implementing custom dynamics. :cvar mass: (
float): Mass of the vehicle in kg. :cvar water_density: (float): Water density in kg / m^3. :cvar volume: (float): Volume of vehicle in m^3. :cvar cob: (np.ndarray): 3-vecter Center of buoyancy from the center of mass in m. :cvar I: (np.ndarray): 3x3 Inertia matrix. :cvar thruster_d: (np.ndarray): 8x3 matrix of unit vectors in the direction of thruster propulsion :cvar thruster_p: (np.ndarray): 8x3 matrix of positions in local frame of thrusters positions in m.Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.HoloOceanAgent(client, name='DefaultAgent')
A learning agent in HoloOcean
Agents can act, receive rewards, and receive observations from their sensors. Examples include the Android, UAV, and SphereRobot.
- Parameters:
client (
HoloOceanClient) – The HoloOceanClient that this agent belongs with.name (
str, optional) – The name of the agent. Must be unique from other agents in the same environment.sensors (
dictof (str,HoloOceanSensor)) – A list of HoloOceanSensors to read from this agent.
- name
The name of the agent.
- Type:
str
- sensors
List of HoloOceanSensors on this agent.
- Type:
dict of (string,
HoloOceanSensor)
- agent_state_dict
A dictionary that maps sensor names to sensor observation data.
- Type:
dict
Methods:
act(action)Sets the command for the agent.
add_sensors(sensor_defs)Adds a sensor to a particular agent object and attaches an instance of the sensor to the agent in the world.
Sets the action to zeros, effectively removing any previous actions.
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
Indicatates whether this agent has a camera or not.
remove_sensors(sensor_defs)Removes a sensor from a particular agent object and detaches it from the agent in the world.
set_control_scheme(index)Sets the control scheme for the agent.
set_physics_state(location, rotation, ...)Sets the location, rotation, velocity and angular velocity of an agent.
teleport([location, rotation])Teleports the agent to a specific location, with a specific rotation.
Attributes:
Gets the action space for the current agent and control scheme.
A list of all control schemes for the agent.
- act(action)
Sets the command for the agent. Action depends on the agent type and current control scheme.
- Parameters:
action (
np.ndarray) – The action to take.
- property action_space
Gets the action space for the current agent and control scheme.
- Returns:
- The action space for this agent and control
scheme.
- Return type:
- add_sensors(sensor_defs)
Adds a sensor to a particular agent object and attaches an instance of the sensor to the agent in the world.
NOTE on shared-memory safety: a sensor added here that reuses the same sensor_name as a previous, already-removed sensor – at a different buffer size (shape/dtype) – is a real cross-process race with the C++ engine: both this client and the engine independently reuse-and-resize the same underlying shared-memory object for a repeated name, with no acknowledgement that the other side has actually stopped using the old-sized mapping first, which can SIGBUS whichever side is still touching it when the resize lands.
Fixed here, entirely client-side: every newly-created sensor (not one whose existing=True, i.e. already present in the world) gets a unique engine-facing name the first time it’s added, or the next time it’s re-added with a different resulting buffer shape/dtype than the last add under that public name – so the same underlying shared-memory object is never reused across an actual size change. self.sensors/self.agent_state_dict (and therefore the state dict tick() returns) still key by the caller-supplied sensor_name exactly as before; only the engine-facing name (sent in AddSensorCommand, used for this sensor’s own shared-memory buffer key, and later for RemoveSensorCommand – see remove_sensors()) can differ from it. Existing callers see no behavior change.
A re-add whose buffer would be the same shape/dtype reuses the previous wire name instead of always minting a new one, because nothing frees a sensor’s shared-memory buffer once allocated (see UHolodeckServer::Free(), called from RemoveSensorCommand, on the engine side – there’s no equivalent on this client’s side, and the engine’s own copy is only freed on an explicit removal, not on every add): giving every single add a brand-new name would leak a full buffer on every add, which adds up quickly for large sensors re-added often. Comparing the resulting shape/dtype rather than the raw config dict matters because config fields can legitimately vary between adds without changing the buffer size at all (an imaging sonar’s RangeMax, for instance) – comparing the dict directly would defeat the reuse almost every time. Reusing the wire name whenever shape/dtype is unchanged hits Malloc()’s existing no-op/reuse branch, the same path any sensor whose config never changes has always safely used, and only mints (and therefore only leaks) a new buffer on an actual size change. Determining the shape/dtype ahead of the real add requires constructing the sensor once already (see _probe_shape_dtype()); this isn’t an independent-derivation risk, since it constructs the same sensor class via the same code path SensorFactory.build_sensor() uses for the real add, just against a throwaway client, so there’s no separate/divergent computation that could disagree with the real one.
- :param sensor_defs (
HoloOceanSensoror: list ofHoloOceanSensor): Sensors to add to the agent.
- :param sensor_defs (
- clear_action()
Sets the action to zeros, effectively removing any previous actions.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- has_camera()
Indicatates whether this agent has a camera or not.
- Returns:
If the agent has a sensor or not
- Return type:
bool
- remove_sensors(sensor_defs)
Removes a sensor from a particular agent object and detaches it from the agent in the world.
- :param sensor_defs (
HoloOceanSensoror: list ofHoloOceanSensor): Sensors to remove from the agent.
- :param sensor_defs (
- set_control_scheme(index)
Sets the control scheme for the agent. See
ControlSchemes.- Parameters:
index (
int) – The control scheme to use. Should be set with an enum fromControlSchemes.
- set_physics_state(location, rotation, velocity, angular_velocity)
Sets the location, rotation, velocity and angular velocity of an agent.
- Parameters:
location (np.ndarray) – New location (
[x, y, z](see Coordinate System))rotation (np.ndarray) – New rotation (
[roll, pitch, yaw], see (see Rotations))velocity (np.ndarray) – New velocity (
[x, y, z](see Coordinate System))angular_velocity (np.ndarray) – New angular velocity (
[x, y, z]in degrees (see Coordinate System))
- teleport(location=None, rotation=None)
Teleports the agent to a specific location, with a specific rotation.
- Parameters:
location (np.ndarray, optional) –
An array with three elements specifying the target world coordinates
[x, y, z]in meters (see Coordinate System).If
None(default), keeps the current location.rotation (np.ndarray, optional) –
An array with three elements specifying roll, pitch, and yaw in degrees of the agent.
If
None(default), keeps the current rotation.
- class holoocean.agents.HoveringAUV(client, name='DefaultAgent')
A simple autonomous underwater vehicle. All variables are not actually used in simulation, modifying them will have no effect on results. They are exposed for convenience in implementing custom dynamics.
Action Space
Has three possible control schemes, as follows
Thruster Forces:
[Vertical Front Starboard, Vertical Front Port, Vertical Back Port, Vertical Back Starboard, Angled Front Starboard, Angled Front Port, Angled Back Port, Angled Back Starboard]PID Controller:
[des_pos_x, des_pos_y, des_pos_z, roll, pitch, yaw]Accelerations, in global frame:
[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]
Inherits from
HoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation.
The following parameters are defined in the C++ code and are not used in the python code. They are provided here for convenience in implementing custom dynamics.
- Variables:
mass – (
float): Mass of the vehicle in kg.water_density – (
float): Water density in kg / m^3.volume – (
float): Volume of vehicle in m^3.cob – (
np.ndarray): 3-vecter Center of buoyancy from the center of mass in m.I – (
np.ndarray): 3x3 Inertia matrix.thruster_d – (
np.ndarray): 8x3 matrix of unit vectors in the direction of thruster propulsionthruster_p – (
np.ndarray): 8x3 matrix of positions in local frame of thrusters positions in m.
Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.HuskyVehicle(client, name='DefaultAgent')
A simple husky vehicle.
Action Space
Has one control scheme:
Wheel Forces:
[Front Left wheel, Front Right wheel, Reset trigger]
Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.ScubaDiver(client, name='DefaultAgent')
A copy of HoveringAUV with scuba diver mesh.
Action Space
Has three possible control schemes, as follows
Thruster Forces:
[Vertical Front Starboard, Vertical Front Port, Vertical Back Port, Vertical Back Starboard, Angled Front Starboard, Angled Front Port, Angled Back Port, Angled Back Starboard]PD Controller:
[des_pos_x, des_pos_y, des_pos_z, roll, pitch, yaw]Accelerations, in global frame:
[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]
Inherits from
HoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation.
- Variables:
mass – (
float): Mass of the vehicle in kg.water_density – (
float): Water density in kg / m^3.volume – (
float): Volume of vehicle in m^3.cob – (
np.ndarray): 3-vecter Center of buoyancy from the center of mass in m.I – (
np.ndarray): 3x3 Inertia matrix.thruster_d – (
np.ndarray): 8x3 matrix of unit vectors in the direction of thruster propulsionthruster_p – (
np.ndarray): 8x3 matrix of positions in local frame of thrusters positions in m.
Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.SphereAgent(client, name='DefaultAgent')
A basic sphere robot.
See SphereAgent for more details.
Action Space:
Has two possible control schemes, one discrete and one continuous:
Control Scheme
Value
Action
Discrete (
0)[0]Move forward
[1]Move backward
[2]Turn right
[3]Turn left
Continuous (
1)[forward_speed, rot_speed]Inherits from
HoloOceanAgent.Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.SurfaceVessel(client, name='DefaultAgent')
A simple surface vessel.
Action Space
Has three possible control schemes, as follows
Thruster Forces:
[Left thruster, Right thruster]PD Controller:
[des_x, des_y, des_yaw]Accelerations, in global frame:
[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]
Inherits from
HoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation.
- Variables:
mass – (
float): Mass of the vehicle in kg.water_density – (
float): Water density in kg / m^3.volume – (
float): Volume of vehicle in m^3.cob – (
np.ndarray): 3-vecter Center of buoyancy from the center of mass in m.I – (
np.ndarray): 3x3 Inertia matrix.thruster_p – (
np.ndarray): 2x3 matrix of positions in local frame of thrusters positions in m.
Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.TorpedoAUV(client, name='DefaultAgent')
A simple foward motion autonomous underwater vehicle.
Action Space
Has two possible action spaces, as follows:
Fins & Propeller:
[left_fin, top_fin, right_fin, bottom_fin, thrust]Accelerations, in global frame:
[lin_accel_x, lin_accel_y, lin_accel_z, ang_accel_x, ang_accel_y, ang_accel_x]
Inherits from
HoloOceanAgent.These variables are the constants used in the C++ for “Thruster” and “PD” control schemes. Editing them in python will not change the vehicle behavior. If using the “custom dynamics” control scheme, these values are ignored, and any desired dynamics parameters must be defined separately in your dynamics implementation. Instructions for implemeting parameters for Thor Fossen dynamics are given in the corresponding fossen dynamics documentation. :cvar mass: (
float): Mass of the vehicle in kg. :cvar water_density: (float): Water density in kg / m^3. :cvar volume: (float): Volume of vehicle in m^3. :cvar cob: (np.ndarray): 3-vecter Center of buoyancy from the center of mass in m. :cvar I: (np.ndarray): 3x3 Inertia matrix. :cvar thruster_p: (np.ndarray): 3 matrix of positions in local frame of propeller position in m. :cvar fin_p: (np.ndarray): 4x3 matrix of positions in local frame of fin positions in m.Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.TurtleAgent(client, name='DefaultAgent')
A simple turtle bot.
Action Space:
[forward_force, rot_force]forward_forceis capped at 160 in either directionrot_forceis capped at 35 either direction
Inherits from
HoloOceanAgent.Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.
- class holoocean.agents.UavAgent(client, name='DefaultAgent')
A UAV (quadcopter) agent
Action Space:
Has two possible continuous action control schemes
[pitch_torque, roll_torque, yaw_torque, thrust] and
[pitch_target, roll_target, yaw_rate_target, altitude_target]
See UAV Agent for more details.
Inherits from
HoloOceanAgent.Attributes:
A list of all control schemes for the agent.
Methods:
get_joint_constraints(joint_name)Returns the corresponding swing1, swing2 and twist limit values for the specified joint.
- property control_schemes
A list of all control schemes for the agent. Each list element is a 2-tuple, with the first element containing a short description of the control scheme, and the second element containing the
ActionSpacefor the control scheme.- Returns:
Each tuple contains a short description and the ActionSpace
- Return type:
(
str,ActionSpace)
- get_joint_constraints(joint_name)
Returns the corresponding swing1, swing2 and twist limit values for the specified joint. Will return None if the joint does not exist for the agent.