## Submodules¶

class openai_ros.task_envs.husarion.husarion_get_to_position_turtlebot_playground.HusarionGetToPosTurtleBotPlayGroundEnv[source]
__init__()[source]

This Task Env is designed for having the husarion in the husarion world closed room with columns. It will learn how to move around without crashing.

__module__ = 'openai_ros.task_envs.husarion.husarion_get_to_position_turtlebot_playground'
_compute_reward(observations, done)[source]

We will reward the following behaviours: 1) The distance to the desired point has increase from last step 2) The robot has reached the desired point

We will penalise the following behaviours: 1) Ending the episode without reaching the desired pos. That means it has crashed or it has gone outside the workspace

_get_obs()[source]

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

_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 that the episode has finished when: 1) Husarion has moved ouside the workspace defined. 2) Husarion is too close to an object 3) Husarion has reached the desired position

_set_action(action)[source]

This set action will Set the linear and angular speed of the SumitXl based on the action number given. :param action: The action integer that set s what movement to do next.

_set_init_pose()[source]

Sets the Robot in its init pose

check_husarion_has_crashed(laser_readings)[source]

Based on the laser readings we check if any laser readingdistance is below the minimum distance acceptable.

check_inside_workspace(current_position)[source]

We check that the current position is inside the given workspace.

check_reached_desired_position(current_position, desired_position, epsilon=0.1)[source]

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

discretize_scan_observation(data, new_ranges)[source]

Discards all the laser readings that are not multiple in index of new_ranges value.

get_distance_from_desired_point(current_position, desired_position)[source]

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

get_distance_from_point(pstart, p_end)[source]

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

get_orientation_euler()[source]
publish_filtered_laser_scan(laser_original_data, new_filtered_laser_range)[source]
update_desired_pos(new_position)[source]

With this method you can change the desired position that you want Usarion to be that initialy is set through rosparams loaded through a yaml file possibly. :new_position: Type Point, because we only value the position.