Chinese version of the README -> please click here
This repository provides ROS support for the Elfin-S Robot. The recommend operating environment is on Ubuntu 18.04 with ROS Melodic. So far These packages haven't been tested in other environment.
Install some important dependent software packages:
$ sudo apt-get install ros-melodic-soem ros-melodic-gazebo-ros-control ros-melodic-ros-control ros-melodic-ros-controllers
Install or upgrade MoveIt!.
If you have installed MoveIt!, please make sure that it's been upgraded to the latest version.
Install/Upgrade MoveIt!:
$ sudo apt-get update
$ sudo apt-get install ros-melodic-moveit-*
install trac_ik plugin
sudo apt-get install ros-melodic-trac-ik
Install this repository from Source
First set up a catkin workspace (see this tutorials).
Then clone the repository into the src/ folder. It should look like /path/to/your/catkin_workspace/src/elfin_robot.
Make sure to source the correct setup file according to your workspace hierarchy, then use catkin_make to compile.
Assuming your catkin workspace folder is ~/catkin_ws, you should use the following commands:
$ cd ~/catkin_ws/src
$ git clone https://github.com/hans-robot/elfin_s_robot.git
$ cd ..
$ catkin_make
$ source devel/setup.bash
There are launch files available to bringup a simulated robot - either Elfin-S05, Elfin-S10 or Elfin-S20.
In the following the commands for Elfin-S05 are given. For Elfin-S10 or Elfin-S20, simply replace the prefix accordingly.
Bring up the simulated robot in Gazebo:
$ roslaunch elfin_gazebo elfin_s05_empty_world.launch
Start up RViz with a configuration including the MoveIt! Motion Planning plugin:
$ roslaunch elfin_s05_moveit_config moveit_planning_execution.launch
If you don't want to start up RViz at the moment, just run:
$ roslaunch elfin_s05_moveit_config moveit_planning_execution.launch display:=false
Start up elfin basic api and "Elfin Control Panel" interface:
$ roslaunch elfin_basic_api elfin_basic_api.launch
Tutorial about how to use MoveIt! RViz plugin: docs/moveit_plugin_tutorial_english.md
Tips: Every time you want to plan a trajectory, you should set the start state to current first.
There are launch files available to bringup a real robot - either Elfin-S05, Elfin-S10 or Elfin-20.
In the following the commands for Elfin-S05 are given. For Elfin-S10 or Elfin-S20, simply replace the prefix accordingly.
Put the file elfin_drivers.yaml, that you got from the vendor, into the folder elfin_robot_bringup/config/.
Connect Elfin to the computer with a LAN cable. Then confirm the ethernet interface name of the connection with ifconfig
. The default ethernet name is eth0. If the ethernet name is not eth0, you should correct the following line in the file elfin_robot_bringup/config/elfin_drivers.yaml
elfin_ethernet_name: eth0
Load Elfin robot model:
$ roslaunch elfin_robot_bringup elfin_s05_bringup.launch
Bring up the hardware of Elfin. Before bringing up the hardware, you should setup Linux with PREEMPT_RT properly. There is a tutorial. There are two versions of elfin EtherCAT slaves. Please bring up the hardware accordingly.
$ sudo chrt 10 bash
$ roslaunch elfin_robot_bringup elfin_ros_control.launch
Start up RViz with a configuration including the MoveIt! Motion Planning plugin:
$ roslaunch elfin_s05_moveit_config moveit_planning_execution.launch
If you don't want to start up RViz at the moment, just run:
$ roslaunch elfin_s05_moveit_config moveit_planning_execution.launch display:=false
Start up elfin basic api and "Elfin Control Panel" interface:
$ roslaunch elfin_basic_api elfin_basic_api.launch
Enable the servos of Elfin with "Elfin Control Panel" interface: if there is no "Warning", just press the "Servo On" button to enable the robot. If there is "Warning", press the "Clear Fault" button first and then press the "Servo On" button.
Tutorial about how to use MoveIt! RViz plugin: docs/moveit_plugin_tutorial_english.md
Tips:
Every time you want to plan a trajectory, you should set the start state to current first.
Before turning the robot off, you should press the "Servo Off" button to disable the robot.
For more information about API, see docs/API_description_english.md