This repository contains the cca_spot package, which implements the closed-chain affordance planning framework on the Boston Dynamics Spot robot. The demonstration video of the underlying paper showcasing simulation and real-world tasks is available here. An interactive RViz plugin is also available as one of many ways to interface with the planner. See the plugin demo videos for a glance at the framework's capabilities.
C++20ROS Humble
If you're not using a real robot, from spot_ros and spot_manipulation, it's sufficient to build only the spot_description and spot_moveit_config packages, which are used for visualization and collision checking:
colcon build --packages-select spot_description spot_moveit_configOtherwise, build all packages with:
colcon buildTip: If you'd like to use your own robot description or MoveIt config for spot, simply update the relevant entries in the
cca_spot_settings.pymodule in thelaunch/directory.
-
Navigate to your ROS2 workspace
srcfolder and clone the repository:cd ~/<ros2_ws_name>/src
git clone git@github.com:UTNuclearRoboticsPublic/closed_chain_affordance_spot.git
-
Build and source the
cca_spotpackage:cd ~/<ros2_ws_name> colcon build --packages-select cca_spot --cmake-args -DCMAKE_BUILD_TYPE=Release source install/setup.bash
To execute CCA-generated joint trajectories on the Spot robot:
-
Run the Spot driver:
ros2 launch spot_bringup bringup.launch.py hostname:=192.168.50.3 has_arm:=True kinematic_model:="mobile_manipulation" -
Launch the CCA visualizer for Spot:
ros2 launch cca_spot cca_spot_val_and_viz.launch.py launch_rviz:=true
This launches both the visualizer and an interactive RVIZ plugin for code-free planning and execution. To plan and execute trajectories using the RViz plugin, start the following action server:
ros2 launch cca_spot cca_spot_action_server.launch.py
At this point, you should be able to interactively plan and execute trajectories using the Rviz plugin.
-
Alternatively, for programmatic task definition, launch the CCA planner which will plan for the tasks defined in
src/cca_spot_node.cpp:ros2 launch cca_spot cca_spot.launch.py
You can plan and visualize joint trajectories for the BD Spot using the CCA framework without needing a physical robot.
-
Launch the Moveit fake controller to simulate trajectory execution:
ros2 launch spot_moveit_config fake_controller.launch.py kinematic_model:="mobile_manipulation"Alternatively, you may launch the Spot offline state publisher to visualize the robot in Rviz at a named configuration and to use this state for planning:
ros2 launch spot_description offline_state_publisher.launch.py has_arm:=True kinematic_model:="mobile_manipulation" configuration:="unstowed"
-
Launch the CCA visualizer for Spot:
ros2 launch cca_spot cca_spot_val_and_viz.launch.py launch_rviz:=true
This launches both the visualizer and an interactive RVIZ plugin for code-free planning and execution. To plan and execute trajectories using the RViz plugin, start the following action server:
ros2 launch cca_spot cca_spot_action_server.launch.py
At this point, you should be able to interactively plan trajectories using the Rviz plugin.
-
Alternatively, for programmatic task definition, launch the CCA planner which will plan for the tasks defined in
src/cca_spot_node.cpp:ros2 launch cca_spot cca_spot.launch.py
-
You may also run the demo by launching the CCA planner demo node:
ros2 launch cca_spot cca_spot_demo.launch.py
- Refer to the CCA-ROS
README.mdCode Tutorial section here for various planning examples.
- Explore the interactive RVIZ plugin for code-free planning and execution
- Modify demo node tasks to create custom trajectories
Janak Panthi (aka Crasun Jans)
For issues, feature requests, or contributions, please open an issue in the GitHub repository.