giskardpy.middleware.ros2.giskard#

Attributes#

Classes#

Giskard

A motion server for one robot.

Module Contents#

giskardpy.middleware.ros2.giskard.logger#
class giskardpy.middleware.ros2.giskard.Giskard#

A motion server for one robot.

Instantiate it with the configs of the setup and call live().

world_config: giskardpy.model.world_config.WorldConfig#

Which robot description is loaded and how the robot is attached to the world.

server_config: giskardpy.middleware.ros2.server_config.GiskardServerConfig#

The goal lifecycle and the debug output of the motion server.

robot_interface_config: giskardpy.middleware.ros2.robot_interface_config.RobotInterfaceConfig#

How Giskard talks to the robot, which also decides whether a motion is simulated or executed.

qp_controller_config: giskardpy.qp.qp_controller_config.QPControllerConfig#

The control frequency and the tuning of the controller.

executor: cramph.executor.StatechartExecutor#

Runs the motion statecharts of the goals.

motion_server: giskardpy.middleware.ros2.motion_server.MotionServer | None = None#

Accepts goals and executes them.

world_synchronizer: semantic_digital_twin.adapters.ros.world_synchronizer.WorldSynchronizer | None = None#

Shares changes of the world with other processes.

tf_publisher: semantic_digital_twin.adapters.ros.tf_publisher.TFPublisher | None = None#

Publishes the frames of the world on tf.

viz_marker_publisher: semantic_digital_twin.adapters.ros.visualization.viz_marker.VizMarkerPublisher | None = None#

Publishes the world as visualization markers.

collision_marker_publisher: semantic_digital_twin.adapters.ros.visualization.collision_viz_marker.CollisionVisualizationMarkerPublisher#

Publishes the closest points of the collision checks as visualization markers.

model_reload_synchronizer: semantic_digital_twin.adapters.ros.world_synchronizer.ModelReloadSynchronizer | None = None#

Reloads the world from the database when another process asks for it, None without a database.

world_fetcher: semantic_digital_twin.adapters.ros.world_fetcher.FetchWorldServer | None = None#

Serves the whole world to processes that join later.

classmethod standalone(world_config: giskardpy.model.world_config.WorldConfig, qp_controller_config: giskardpy.qp.qp_controller_config.QPControllerConfig) → Self#
Parameters:
  • world_config – Which robot description is loaded and how the robot is attached to the world.

  • qp_controller_config – The control frequency and the tuning of the controller.

Returns:

A Giskard that simulates the robot instead of commanding it, with debug output enabled.

classmethod launch(create_giskard: Callable[[], Giskard], node_name: str = 'giskard') → None#

Run a Giskard as a ros node until ROS shuts down.

Parameters:
  • create_giskard – Builds the Giskard to run. It is called once the ros node exists, so it can read from topics.

  • node_name – The name of the ros node.

setup()#

Initialize the world, the ros interfaces and the motion server.

You usually don’t need to call this.

create_motion_server() → giskardpy.middleware.ros2.motion_server.MotionServer#

Build the goal lifecycle around the executor.

receive_child_choices(world_updates: giskardpy.middleware.ros2.world_updates.IncomingWorldUpdates, action_server: giskardpy.middleware.ros2.action_server.ActionServerHandler) → None#

Let the nodes of a goal that choose their child run the children the client sends for them.

create_post_goal_plotters() → list[giskardpy.middleware.ros2.post_goal_plotters.PostGoalPlotter]#

Create the debug plotters that are configured and let them record what they need.

setup_world_model_ros_interface()#
close_world_model_ros_interface()#

Deregister everything Giskard attached to the world and destroy its ros entities.

The world outlives the ros node whenever Giskard is torn down while the world is kept, and a callback that publishes on a destroyed node fails. Nothing may therefore stay registered on the world.

Note

Giskard can fail before all of them exist, so only the ones that were created are closed.

sanity_check()#
property robot: semantic_digital_twin.robots.robot_parts.AbstractRobot#
property robots: list[semantic_digital_twin.robots.robot_parts.AbstractRobot]#
live()#

Start Giskard and wait for goals until ROS shuts down.

An error is raised after Giskard has cleaned up, so that a robot that could not be set up makes the process fail.