openai_ros.task_envs.wamv package


openai_ros.task_envs.wamv.wamv_nav_twosets_buoys module

class openai_ros.task_envs.wamv.wamv_nav_twosets_buoys.WamvNavTwoSetsBuoysEnv[source]

Bases: openai_ros.robot_envs.wamv_env.WamvEnv


Make Wamv learn how to move straight from The starting point to a desired point inside the designed corridor. Demonstrate Navigation Control

__module__ = 'openai_ros.task_envs.wamv.wamv_nav_twosets_buoys'
_compute_reward(observations, done)[source]

We Base the rewards in if its done or not and we base it on if the distance to the desired point has increased or not :return:


Here we define what sensor data defines our robots observations To know which Variables we have access to, we need to read the WamvEnv API DOCS. :return: observation


Inits variables needed to be initialised each time we reset at the start of an episode. :return:


We consider the episode done if: 1) The wamvs is ouside the workspace 2) It got to the desired point


It sets the joints of wamv based on the action integer given based on the action number given. :param action: The action integer that sets what movement to do next.


Sets the two proppelers speed to 0.0 and waits for the time_sleep to allow the action to be executed


Calculates the distance from the current position to the desired point :param start_point: :return:

get_distance_from_point(pstart, p_end)[source]

Given a Vector3 Object, get distance from current position :param p_end: :return:

is_in_desired_position(current_position, epsilon=0.05)[source]

It return True if the current position is similar to the desired poistion


Check if the Wamv is inside the Workspace defined

Module contents