Difference between revisions of "MYRAbot's arm control (bioloid+arduino)"
(→Creating a package for our programs) |
(→Creating a package for our programs) |
||
Line 31: | Line 31: | ||
===Creating a package for our programs=== | ===Creating a package for our programs=== | ||
− | Previously, we must have created a [[Fernando-TFM-ROS02#Creando un espacio de trabajo|workspace]] for our [http://www.ros.org ROS] distribution. We will create a ''package'' to compile and send our programs to [http://www.arduino.cc arduino] board. | + | Previously, we must have created a [[Fernando-TFM-ROS02#Creando un espacio de trabajo|workspace]] for our [http://www.ros.org ROS] distribution. We will create a ''package'' in order to compile and send our programs to [http://www.arduino.cc arduino] board. We will make a ''package'' named "arduino_fer" with the the necessary dependences for our programs, for this, we will execute the next commands in a terminal: |
+ | |||
+ | <syntaxhighlight>cd ~/ros_workspace | ||
+ | roscreate-pkg arduino_fer rosserial_arduino std_msgs</syntaxhighlight> | ||
+ | |||
+ | |||
<!-- | <!-- |
Revision as of 15:56, 24 December 2013
Bioloid arm
The arm that we will use is that Carlos Rodríguez Hernández developed in the project MYRA Robot: Hardware Update . The main components are:
- Arduino mega 2560 board.
- 74LS241 chip (tree-state Buffer).
- Voltage regulator circuit.
- 5 serial servo motors Dynamixel AX-12A.
- Mounting components of Bioloid kit.
- Parts made for the gripper and to fix to MYRAbot.
Arduino IDE and rosserial
For the communication among arduino and ROS, we install arduino IDE and rosserial (package de ROS which include the package rosserial_arduino with the libraries for arduino. We will start to installing arduino IDE, for this, we will execute the next commands in a terminal:
sudo apt-get update
sudo apt-get install arduino arduino-core
When the installation of arduino software ends, we will install the ROS package. For this, we will execute the next command in a terminal:
sudo apt-get install ros-ROS_DISTRO-rosserial
When we will have installed arduino IDE and the stack rosserial, we must copy the libraries for the package rosserial_arduino to the sketchbook of arduino. For this, we will execute the next commands in a terminal:
roscd rosserial_arduino/libraries
cp -r ros_lib /home/”SESSION_NAME”/sketchbook/libraries/ros_lib
Creating a package for our programs
Previously, we must have created a workspace for our ROS distribution. We will create a package in order to compile and send our programs to arduino board. We will make a package named "arduino_fer" with the the necessary dependences for our programs, for this, we will execute the next commands in a terminal:
cd ~/ros_workspace
roscreate-pkg arduino_fer rosserial_arduino std_msgs