openai_ros.task_envs.shadow_tc package

Submodules

openai_ros.task_envs.shadow_tc.learn_to_pick_ball module

class openai_ros.task_envs.shadow_tc.learn_to_pick_ball.ShadowTcGetBallEnv[source]

Bases: openai_ros.robot_envs.shadow_tc_env.ShadowTcEnv

__init__()[source]

Make ShadowTc learn how pick up a ball

__module__ = 'openai_ros.task_envs.shadow_tc.learn_to_pick_ball'
_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 ball has increased or not. :return:

_get_obs()[source]

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

_init_env_variables()[source]

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

_is_done(observations)[source]

We consider the episode done if: 1) The shadow_tc TCP is outside the workspace. 2) The TCP to block distance is lower than a threshold ( it got to the place )

and the the collisions in the figuers are true.
_set_action(action)[source]

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

_set_init_pose()[source]

Sets the UR5 arm to the initial position and the objects to the original position.

get_distance_from_point(pstart, p_end)[source]

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

is_inside_workspace(current_position)[source]

Check if the shadow_tc is inside the Workspace defined

reached_ball(tcp_position, ball_position, minimum_distance, finguers_collided)[source]

Return true if the distance from TCP position to the ball position is lower than the minimum_distance and all three finguers are touching the ball.

Module contents