Skip to content

Control the Interbotix Pan-Tilt module payload to aim at specific targets within the same transform tree

Notifications You must be signed in to change notification settings

UTNuclearRobotics/turret_aim_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Turret Aim Controller

This repository contains packages to control an Interbotix Pan & Tilt module to aim at a target transform.

Install Interbotix Dependencies

Create an Interbotix workspace to clone and build the necessary packages to control the turret. This will be used as an underlayed workspace.

  1. Choose one of the following depending on your system. This will install the Interbotix ROS 2 interface core packages and create a interbotix_ws directory.
  • AMD64 Install

    sudo apt install curl
    curl 'https://raw.githubusercontent.com/Interbotix/interbotix_ros_manipulators/main/interbotix_ros_xsarms/install/amd64/xsarm_amd64_install.sh' > xsarm_amd64_install.sh
    chmod +x xsarm_amd64_install.sh
    ./xsarm_amd64_install.sh -d humble
    
  • Raspberry Pi Install

    sudo apt install python3-pip
    
    sudo apt install curl
    curl 'https://raw.githubusercontent.com/Interbotix/interbotix_ros_manipulators/main/interbotix_ros_xsarms/install/rpi4/xsarm_rpi4_install.sh' > xsarm_rpi4_install.sh
    chmod +x xsarm_rpi4_install.sh
    ./xsarm_rpi4_install.sh -d humble
    
  1. Install the Interbotix turret packages inside the interbotix_ws/src. Build the workspace in interbotix_ws using colcon build.
git clone -b humble https://github.com/Interbotix/interbotix_ros_turrets.git
  1. Underlay the Interbotix workspace by sourcing it and build the workspace containing the turret_aim_controller packages using colcon build.
. ~/interbotix_ws/install/setup.bash
colcon build

Running the Packages

This basic demo will setup a virtual turret aiming at a circular rotating target. Make sure to create a new terminal and source the workspace install/setup.bash before running any of these commands.

Spawn the turret in RViz.

ros2 launch turret_aim_control spawn_turret.launch.py

Spawn the moving target.

ros2 run turret_aim_control target

Call the aim enable service.

ros2 service call /aim_enable turret_aim_control_interfaces/srv/AimEnable {"aim_enable: true, target_frame_id: target"}

You should now see the turret aiming at the target.

drawing

You can call this to stop it.

ros2 service call /aim_enable turret_aim_control_interfaces/srv/AimEnable {"aim_enable: false"}

About

Control the Interbotix Pan-Tilt module payload to aim at specific targets within the same transform tree

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published