Ask Your Question
2

<<Solved>>Getting started with Arbotix python. Keeping it simple

asked 2016-05-15 23:32:24 -0500

bordenmike518@gmail.com gravatar image

updated 2016-05-28 21:13:43 -0500

Hello World,

Good news everybody!! I'm new to robotics and I'm ready to get started. The thing is, I need a little help getting started. I recently bought six AX-12 servos, an Arbotix-M controller, a FTDI cable, and I have it all put together with some 3D printed parts. For software I currently have both my laptop (i7, 16GB RAM, 1TB SSD) and Raspberry Pi 2 (SSH) running Ubuntu 14.04 LTS, ROS Jade, and the PYTHON Arbotix package for ROS. Everything is up, running with all error messages fixed. This is where you hopefully come in...

I'm reaching out for someone to create a simple 'starter package' to help me out. In this package I just need the basic few files to just get these motor moving. A BASIC 2-3 servo (pan and tilt) setup that is made with a simple loop that has a # Commented area showing where to add some code so I can program a couple moves to get started. So, a package contain CMakeList.txt, package.xml, .yaml (2-3 servos, small setup), .launch, publisher.py (with a basic back and forth loop), and a subscriber.py (printing some basic servo feedback).

############################################################################################# In the publisher python file that will be doing a basic pan tilt loop, can you just comment the section for me to add code to, like this currently is (or something to make it understandable). #############################################################################################

This should be a quick project for anyone willing to help, and I would be overly appreciative. I will be sharing this with many other noobs that are getting starting like me. We are a new group of students who just wanted an educational hobby. So the 'Beginner_Arbotix_Python_PKG' you come up with will be used to teach fellow student, as well as younger students. Can't wait to see what you come up with!!!

Thanks, Mike

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2016-05-24 22:35:30 -0500

bordenmike518@gmail.com gravatar image

<< SOLVED>>>

I'm new to this, so this is only for reference, I am by no means a professional. After some long hours, I have made the arm move!! I thought I would show the files I used to make it work since it is not so simple for some. If you have already downloaded the arbotix package, and used the 'arbotix_terminal' to find all of your dynamixel ax-12 servos (I will assume you have already done this after installing the arbotix package). Also, I will assume that you have loaded ROS onto your arbotix controller with the Arduino IDE as described here. I will now describe the files I needed to accomplish this. Good luck!!

Create a new package

$ cd ~/catkin_ws/src
$ catkin_create_package arbotix_ros std_msgs rospy roscpp
$ cd arbotix_ros

In the src folder, update your package.xml to look like this...

<?xml version="1.0"?>
<package>
  <name>ros_arbx</name>
  <version>0.0.0</version>
  <description>The ros_arbx package</description>

  <maintainer email="ubuntu@todo.todo">ubuntu</maintainer>

  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>


  <export>

  </export>
</package>

Then make your CMakeLists.txt look like this...

cmake_minimum_required(VERSION 2.8.3)
project(ros_arbx)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
  roscpp
  rospy
  std_msgs
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)


## Uncomment this if the package has a setup.py. This macro ensures
## modules and global scripts declared therein get installed
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
# catkin_python_setup()

################################################
## Declare ROS messages, services and actions ##
################################################

## To declare and build messages, services or actions from within this
## package, follow these steps:
## * Let MSG_DEP_SET be the set of packages whose message types you use in
##   your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
## * In the file package.xml:
##   * add a build_depend tag for "message_generation"
##   * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
##   * If MSG_DEP_SET isn't empty the following dependency has been pulled in
##     but can be declared for certainty nonetheless:
##     * add a run_depend tag for "message_runtime"
## * In this file (CMakeLists.txt):
##   * add "message_generation" and every package in MSG_DEP_SET to
##     find_package(catkin REQUIRED COMPONENTS ...)
##   * add "message_runtime" and every package in MSG_DEP_SET to
##     catkin_package(CATKIN_DEPENDS ...)
##   * uncomment the add_*_files sections below as needed
##     and list every .msg/.srv/.action file to be processed
##   * uncomment the generate_messages entry below
##   * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)

## Generate messages in the 'msg' folder
# add_message_files(
#   FILES
#   Message1.msg
#   Message2.msg
# )

## Generate services in the 'srv' folder
# add_service_files(
#   FILES
#   Service1.srv
#   Service2.srv
# )

## Generate actions in the 'action' folder
# add_action_files(
#   FILES
#   Action1.action
#   Action2.action
# )

## Generate added messages and services with any dependencies listed here
# generate_messages(
#   DEPENDENCIES
#   std_msgs
# )

################################################
## Declare ROS dynamic reconfigure parameters ##
################################################

## To declare and build dynamic reconfigure parameters within this
## package, follow these steps:
## * In the file ...
(more)
edit flag offensive delete link more

Comments

what a great answer. how does this not have more upvotes?

rational_galt gravatar image rational_galt  ( 2020-05-18 01:14:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-15 23:32:24 -0500

Seen: 912 times

Last updated: May 28 '16