Coder Social home page Coder Social logo

interbotix_px100_control's Introduction

Interbotix PX100 Control

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.

Installation

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.

Usage

After installing the requirements, follow these steps to use the package:

  1. Open a new terminal and start rosmaster by running:
$ roscore
  1. 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.

PID Controller

  1. Open a new terminal and navigate to the repository's location.
  2. Change directory to the scripts folder:
$ cd scripts
  1. Run the main_pid.py script:
$ python3 main_pid.py

The robot will start moving and return to the home position with joint values $q = [0.0, 0.0, 0.0, 0.0]$. You can set desired joint values using the /px100/commands/desired_joint_states topic. For exampel if you want to navigate the robot to the $q = [1.0, -0.5, 0.4, -0.2]$ run 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: [1.0, -0.5, 0.4, -0.2]"

Adaptive Controller

  1. Similar to the PID controller, go to the scripts directory.
  2. Run the Adaptive controller by executing main_adaptive.py.
  3. 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 $q = [-0.4, 0.25, -0.1, 0.42]$.

Conclusion

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.

interbotix_px100_control's People

Contributors

aliirezaei avatar

Stargazers

 avatar 张志诚 avatar Banaan Kiamanesh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.