panda_gazebo.core.control_server
This server is responsible for controlling the Panda arm. It created several
(action) services that can be used to send control commands to the Panda Robot arm and
hand. These services wrap around the original control topics and services created by
the franka_ros and ros_control packages and add extra functionality. They allow
you to wait
for control commands to be completed, send incomplete control commands
and incomplete trajectories (i.e. control commands/trajectories that do not contain
all the joints).
- Main services:
get_controlled_joints
follow_joint_trajectory
set_joint_commands
panda_hand/set_gripper_width
- Main actions:
panda_arm/follow_joint_trajectory
- Extra services:
panda_arm/set_joint_positions
panda_arm/set_joint_efforts
Module Contents
Classes
Controller server used to send control commands to the simulated Panda Robot. |
Attributes
- panda_gazebo.core.control_server.ARM_POSITION_CONTROLLER = 'panda_arm_joint_position_controller'[source]
- panda_gazebo.core.control_server.ARM_EFFORT_CONTROLLER = 'panda_arm_joint_effort_controller'[source]
- class panda_gazebo.core.control_server.PandaControlServer(autofill_traj_positions=False, load_gripper=True, load_set_joint_commands_service=True, load_arm_follow_joint_trajectory_action=False, load_extra_services=False, controllers_check_rate=CONTROLLER_INFO_RATE)[source]
Bases:
object
Controller server used to send control commands to the simulated Panda Robot.
- joint_states
The current joint states.
- Type:
sensor_msgs.JointState
- arm_joint_positions_threshold
The current threshold for determining whether the arm joint positions are within the given setpoint.
- Type:
- arm_joint_efforts_threshold
The current threshold for determining whether the arm joint efforts are within the given setpoint.
- Type:
- arm_velocity_threshold
The current threshold for determining whether the arm has zero velocity.
- Type:
Initialise PandaControlServer object.
- Parameters:
autofill_traj_positions (bool, optional) – Whether you want to automatically set the current states as positions when the positions field of the joint trajectory message is left empty. Defaults to
False
.load_gripper (boolean, optional) – Whether we also want to load the gripper control services.
load_set_joint_commands_service (boolean, optional) – Whether the set joint commands service should be loaded. This service is used by the ros_gazebo_gym package when the control type is NOT set to
trajectory
. Defaults, toTrue
.load_arm_follow_joint_trajectory_action (boolean, optional) – Whether the arm follow joint trajectory action should be loaded. This service is used by the ros_gazebo_gym package when the control type is set to
trajectory
. Defaults, toFalse
.load_extra_services (bool, optional) – Whether to load extra services that are not used by the ros_gazebo_gym package. Defaults to
False
.controllers_check_rate (float, optional) – Rate at which the availability of the used controllers is checked. Setting this to
-1
will check at every time step. Defaults to0.1
Hz.
Warning
Please note that increasing the
controllers_check_rate
decreases the control frequency.- property arm_trajectory_action_preempted[source]
Returns whether the arm joint trajectory action server is preempted.
- property controlled_joints[source]
Returns the joints that can be controlled by a each control type.
Important
This does not mean that the necessary controller is running. It only means that the controller was loaded and can be used to control the joints when it is started.
- Returns:
- A dictionary containing the joints that are controlled when using a
given control type (i.e.
control_type
>``control_group``>``controller``).
- Return type:
- property joint_controllers[source]
Retrieves the controllers which are currently loaded to control each joint.
- Returns:
- A dictionary where the keys are joint names and the values are
lists of controllers that can control the joint.
- Return type: