# Wam-V Environment¶

Wam-V is the robot used in the RobotX_Maritime_Challenge. Its a water vehicle that has to navigate autonomously.

## Robot Environment¶

### openai_ros.robot_envs.wamv_env module¶

class openai_ros.robot_envs.wamv_env.WamvEnv[source]

Superclass for all WamvEnv environments.

__init__()[source]

Initializes a new WamvEnv environment.

To check any topic we need to have the simulations running, we need to do two things: 1) Unpause the simulation: without that th stream of data doesnt flow. This is for simulations that are pause for whatever the reason 2) If the simulation was running already for some reason, we need to reset the controlers. This has to do with the fact that some plugins with tf, dont understand the reset of the simulation and need to be reseted to work properly.

The Sensors: The sensors accesible are the ones considered usefull for AI learning.

Sensor Topic List: * /wamv/odom: Odometry of the Base of Wamv

Actuators Topic List: * /cmd_drive: You publish the speed of the left and right propellers.

Args:

__module__ = 'openai_ros.robot_envs.wamv_env'
_check_all_publishers_ready()[source]

Checks that all the publishers are working :return:

_check_all_sensors_ready()[source]
_check_all_systems_ready()[source]

Checks that all the sensors, publishers and other simulation systems are operational.

_check_odom_ready()[source]
_check_pub_connection(publisher_object)[source]
_compute_reward(observations, done)[source]

Calculates the reward to give based on the observations given.

_get_obs()[source]
_init_env_variables()[source]

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

_is_done(observations)[source]

Checks if episode done based on observations given.

_odom_callback(data)[source]
_set_action(action)[source]

Applies the given action to the simulation.

_set_init_pose()[source]

Sets the Robot in its init pose

get_odom()[source]
set_propellers_speed(right_propeller_speed, left_propeller_speed, time_sleep=1.0)[source]

It will set the speed of each of the two proppelers of wamv.

wait_time_for_execute_movement(time_sleep)[source]

Because this Wamv position is global, we really dont have a way to know if its moving in the direction desired, because it would need to evaluate the diference in position and speed on the local reference.