How sidharthsharma96/tabletennis works
Tabletennis is a ROS/Gazebo simulation of a KUKA iiwa playing table tennis, with ROS interfaces and control components supplied by the adjacent iiwa_stack. The documented workflow starts a simulated world, then accepts demo, pose, incremental-motion, or RViz planning requests; the world plugin tracks ball motion and exposes simulation services. The plugin excerpt confirms a ROS agent-command dispatch, but the agent implementation and several launch/configuration details were not sampled, so those connections are kept limited. Paths for unsampled subsystems use their exact enclosing directories.
Main entry points: training_return_plugin.cc Training world plugin · table_tennis Pose and step services · iiwa_hw.hpp Robot hardware interface · table_tennis_agent.py Table-tennis agent
Components 21
Table-tennis simulation
- Demo and world services
src/table_tennis - Training world plugin
src/table_tennis/plugins/training_return_plugin.cc - Ball physics plugin
src/table_tennis/plugins/ball_plugin.cc - Ball state topic
- Simulation packages
src/iiwa_stack/iiwa_gazebo
Agent and learning
- Table-tennis agent
src/table_tennis/scripts/table_tennis_agent.py - DQN runner
src/table_tennis/scripts/dqn.py - DQN model
src/table_tennis/nn/dqn.py
iiwa control stack
- Cartesian-to-joint control
src/iiwa_stack/iiwa_control/src/iiwa_sunrise.py - Joint trajectory controller
- Hardware control loop
src/iiwa_stack/iiwa_hw/src/main.cpp - Robot hardware interface
src/iiwa_stack/iiwa_hw/include/iiwa_hw.hpp - ROS commands and services
src/iiwa_stack/iiwa_ros/include/iiwa_ros - ROS robot state
src/iiwa_stack/iiwa_ros/include/iiwa_ros/state - KUKA Sunrise application
src/iiwa_stack/iiwa_ros_java/src/de/tum/in/camp/kuka/ros - Robot description
src/iiwa_stack/iiwa_description
Motion and planning
- IK solver
src/table_tennis/scripts/ik_solver.cpp - Pose and step services
src/table_tennis - MoveIt and RViz planning
src/iiwa_stack/iiwa_moveit
Other components
- ROS user
- Gazebo world
Connections 23
- ROS user → Demo and world services: requests demo
- ROS user → Pose and step services: requests motion
- ROS user → MoveIt and RViz planning: plans paths
- Gazebo world → Training world plugin: loads plugin
- Gazebo world → Ball physics plugin: loads plugin
- Training world plugin → Ball state topic: publishes state
- Ball physics plugin → Gazebo world: simulates ball
- Demo and world services → Training world plugin: serves demo
- Training world plugin → Table-tennis agent: dispatches command
- Table-tennis agent → DQN runner: runs policy
- DQN runner → DQN model: uses model
- Table-tennis agent → Pose and step services: requests robot action
- Pose and step services → IK solver: solves pose
- Pose and step services → Cartesian-to-joint control: submits pose command
- Cartesian-to-joint control → Joint trajectory controller: publishes trajectory
- Joint trajectory controller → Robot hardware interface: commands joints
- Hardware control loop → Robot hardware interface: reads and writes
- Hardware control loop → Robot hardware interface: updates control
- ROS commands and services → KUKA Sunrise application: bridges commands
- KUKA Sunrise application → ROS robot state: publishes state
- Robot hardware interface → ROS robot state: exposes state
- MoveIt and RViz planning → Robot description: uses model
- Simulation packages → Gazebo world: configures simulation