Wam-V Environment

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

Wam-V Simulation

Robot Environment

openai_ros.robot_envs.wamv_env module

class openai_ros.robot_envs.wamv_env.WamvEnv[source]

Bases: openai_ros.robot_gazebo_env.RobotGazeboEnv

Superclass for all WamvEnv environments.


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.


__module__ = 'openai_ros.robot_envs.wamv_env'

Checks that all the publishers are working :return:


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

_compute_reward(observations, done)[source]

Calculates the reward to give based on the observations given.


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


Checks if episode done based on observations given.


Applies the given action to the simulation.


Sets the Robot in its init pose

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.


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.