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
-
__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:
-