openai_ros.task_envs.shadow_tc package


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


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:


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


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 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.

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.


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:


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