ros_gazebo_gym.task_envs.panda

The Panda task environments.

isort:skip_file

Subpackages

Submodules

Package Contents

Classes

PandaReachEnv

Class that provides all the methods used for the algorithm training.

PandaPickAndPlaceEnv

Classed used to create a Panda pick and place environment.

PandaPushEnv

Classed used to create a Panda push environment.

PandaSlideEnv

Classed used to create a Panda slide environment.

class ros_gazebo_gym.task_envs.panda.PandaReachEnv(control_type='effort', positive_reward=False, config_path=CONFIG_FILE_PATH, gazebo_world_launch_file='start_reach_world.launch', visualize=None, action_space_dtype=np.float64, observation_space_dtype=np.float64)[source]

Bases: ros_gazebo_gym.robot_envs.panda_env.PandaEnv, gymnasium.utils.EzPickle

Class that provides all the methods used for the algorithm training.

action_space

Gym action space object.

Type:

gym.spaces.box.Box

observation_space

Gym observation space object.

Type:

gym.spaces.dict.Dict

goal

The current goal.

Type:

geometry_msgs.PoseStamped

Initializes a Panda Task Environment.

Parameters:
  • control_Type (str, optional) – The type of control you want to use for the panda robot (i.e. hand and arm). Options are: trajectory, position, effort or end_effector. Defaults to effort.

  • positive_reward (bool, optional) – Whether you want to use a positive reward instead of a negative reward. Defaults to False.

  • config_path (str, optional) – Path where the environment configuration value are found. The path is resolved relative to the panda_reach class file.

  • gazebo_world_launch_file (str, optional) – Name of the launch file that loads the gazebo world. Currently only the launch files inside the panda_gazebo package are supported. Defaults to start_reach_world.launch.

  • visualize (bool, optional) – Whether you want to show the RViz visualization. Defaults to None meaning the task configuration file values will be used.

  • action_space_dtype (union[numpy.dtype, str], optional) – The data type of the action space. Defaults to np.float64.

  • observation_space_dtype (union[numpy.dtype, str], optional) – The data type of the observation space. Defaults to np.float64.

Important

In this environment, the joint trajectory control is not implemented yet for multiple waypoints. This is because the action space only contains one waypoint. The set_arm_joint_trajectory method, however, already accepts multiple waypoints. As a result, task environment can be easily extended to work with multiple waypoints by modifying the PandaReachEnv~._create_action_space method.

class ros_gazebo_gym.task_envs.panda.PandaPickAndPlaceEnv(config_path=CONFIG_FILE_PATH, gazebo_world_launch_file='start_pick_and_place_world.launch', *args, **kwargs)[source]

Bases: ros_gazebo_gym.task_envs.panda.panda_reach.PandaReachEnv, gymnasium.utils.EzPickle

Classed used to create a Panda pick and place environment.

object_marker_class

The RViz marker class used for displaying the object. Can be overwritten by child environments to change the visualization of the object.

Type:

visualization_msgs.msg.Marker

object_frame_name

The name used for the object tf frame.

Type:

str

Initializes a Panda pick and place task environment.

Parameters:
  • config_path (str, optional) – Path where the environment configuration value are found. The path is resolved relative to the panda_reach class file.

  • gazebo_world_launch_file (str, optional) –

    Name of the launch file that loads the gazebo world. Currently only the launch files inside the panda_gazebo package are supported. Defaults to start_pick_and_place_world.launch.

  • *args – Arguments passed to the PandaReachEnv super class.

  • **kwargs – Keyword arguments that are passed to the PandaReachEnv super class.

property contains_object

Checks whether the simulation contains the object.

Returns:

Whether the object was found in the simulation.

Return type:

bool

property object_position

Retrieves the current object position.

property object_rot

Retrieves the current object rotation.

property object_pose

Retrieves the current object pose.

class ros_gazebo_gym.task_envs.panda.PandaPushEnv(*args, **kwargs)[source]

Bases: ros_gazebo_gym.task_envs.panda.panda_pick_and_place.PandaPickAndPlaceEnv, gymnasium.utils.EzPickle

Classed used to create a Panda push environment.

Initializes a Panda Push task environment.

Parameters:
  • *args – Arguments passed to the PandaPushEnv super class.

  • **kwargs – Keyword arguments that are passed to the PandaPushEnv super class.

class ros_gazebo_gym.task_envs.panda.PandaSlideEnv(*args, **kwargs)[source]

Bases: ros_gazebo_gym.task_envs.panda.panda_pick_and_place.PandaPickAndPlaceEnv, gymnasium.utils.EzPickle

Classed used to create a Panda slide environment.

Initializes a Panda Slide task environment.

Parameters:
  • *args – Arguments passed to the PandaSlideEnv super class.

  • **kwargs – Keyword arguments that are passed to the PandaSlideEnv super class.