This repository contains a ROS package for controlling the Interbotix X-Series arm manipulator, specifically the PX100
arm. The package is written in ROS Noetic distribution and utilizes sympybotics with some modifications to generate the arm dynamics.
Before using this package, ensure that you have installed ROS Noetic (or one of the ROS1 distributions) and the Interbotix ROS open-source packages. You can clone this repository inside your ROS workspace by running the following command:
$ git clone https://github.com/AliiRezaei/interbotix_px100_control.git
It's recommended to clone the repository inside the interbotix_ros_xsarms
directory.
After installing the requirements, follow these steps to use the package:
- Open a new terminal and start rosmaster by running:
$ roscore
- In another terminal, launch the PX100 RViz model:
$ roslaunch interbotix_xsarm_control xsarm_control.launch robot_model:=px100 use_sim:=true
You will see the PX100
arm in the RViz
environment in its default sleep position. This package provides two types of controllers for manipulating the arm within its admissible workspace: PID
and Adaptive
controllers.
To use the controllers, you must change the robot's operating mode from default position to PWM
mode. Run the following command:
$ rosservice call /px100/set_operating_modes "{cmd_type: 'group', name: 'arm', mode: 'pwm', profile_type: 'time', profile_velocity: 131, profile_acceleration: 25}"
Once you have changed the operating mode, you can use either the PID
or Adaptive
controllers to control the PX100 arm.
- Open a new terminal and navigate to the repository's location.
- Change directory to the scripts folder:
$ cd scripts
- Run the
main_pid.py
script:
$ python3 main_pid.py
The robot will start moving and return to the home position with joint values /px100/commands/desired_joint_states
topic. For exampel if you want to navigate the robot to the
$ rostopic pub -1 /px100/commands/desired_joint_states std_msgs/Float32MultiArray "layout:
dim:
- label: ''
size: 0
stride: 0
data_offset: 0
data: [1.0, -0.5, 0.4, -0.2]"
- Similar to the
PID
controller, go to the scripts directory. - Run the
Adaptive
controller by executingmain_adaptive.py
. - Set desired joint positions using the following command:
$ rostopic pub -1 /px100/commands/desired_joint_states std_msgs/Float32MultiArray "layout:
dim:
- label: ''
size: 0
stride: 0
data_offset: 0
data: [-0.4, 0.25, -0.1, 0.42]"
The robot will move to the desired position
In conclusion, this repository provides a comprehensive control package for the Interbotix PX100
arm manipulator in a ROS environment. Feel free to explore and experiment with different controllers to manipulate the arm effectively.