• Stars
    star
    244
  • Rank 165,856 (Top 4 %)
  • Language
    C++
  • License
    BSD 3-Clause "New...
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Provides a simple simulation interface and template for setting up a hardware interface for ros_control

ROS Control Boilerplate

Simple simulation interface and template for setting up a hardware interface for ros_control. The idea is you take this as a starting point for creating your hardware interfaces, and it is needed because ros_control documentation is sparse. This boilerplate demonstrates:

  • Creating a hardware_interface for multiple joints for use with ros_control
  • Position Trajectory Controller
  • Control of 2 joints of the simple robot "RRBot" pictured below
  • Loading configurations with roslaunch and yaml files
  • Generating a random trajectory and sending it over an actionlib interface
  • Partial support of joint mode switching (needs to be improved)
  • Joint limits
  • Pass-through non-physics based robot simulator
  • Visualization in Rviz

This open source project was developed at PickNik Robotics. Need professional ROS development and consulting? Contact us at [email protected] for a free consultation.

Maintainers

Special thanks to the following maintainers of this repo:

  • Dave Coleman (@davetcoleman)
  • Andy Zelenak (@AndyZe)
  • John Morris (@zultron)
  • Robert Wilbrandt (@RobertWilbrandt)

Status:

  • Build Status Travis CI
  • Devel Job Status Devel Job Status
  • Build Status AMD64 Debian Job Status

Video Demo

See YouTube for a very modest video demo.

Install

This package depends on gazebo_ros_demos for its rrbot_description package, but you must add it to your catkin workspace by source:

git clone https://github.com/ros-simulation/gazebo_ros_demos.git

Then, either install this package from source so you can develop off of it, or install from debian:

sudo apt-get install ros-indigo-ros-control-boilerplate

Run Simulation Demo

This package is setup to run the "RRBot" two joint revolute-revolute robot demo. This "template package" is located in the ros_control_boilerplate as a subfolder that you can easily rename and reuse. To run its ros_control non-physics-based simulated hardware interface, run:

roslaunch ros_control_boilerplate rrbot_simulation.launch

To visualize its published /tf coordinate transforms in Rviz run:

roslaunch ros_control_boilerplate rrbot_visualize.launch

To send a random, dummy trajectory to execute, run:

roslaunch ros_control_boilerplate rrbot_test_trajectory.launch

Customize

To test this as a simulation interface for your robot, you can quickly rename the subfolder package into the name of your robot using the following commands:

function findreplace() {
    grep -lr -e "$1" * | xargs sed -i "s/$1/$2/g" ;
}

function findreplacefilename() {
    find . -depth -name "*$1*" -exec bash -c 'for f; do base=${f##*/}; mv -- "$f" "${f%/*}/${base//'$1'/'$2'}"; done' _ {} +
}

findreplacefilename rrbot myrobot
findreplace rrbot myrobot
findreplace RRBot MyRobot
findreplace RRBOT MYROBOT

Then add the necessary code to communicate with your robot via USB/serial/ethernet/etc in the file myrobot_hw_interface.cpp.

Setting an Initial Position, Using with MoveIt!

If you need your robot to startup at a particular position in simulation, or you would like to use this funcitonality to simulate your robot with MoveIt!, see the downstream package (it depends on this package) moveit_sim_controller

Other Helper Tools

Recording to CSV

Write the commands from a trajectory controller to csv file

rosrun ros_control_boilerplate controller_to_csv SAVE_TO_FILE_PATH CONTROLLER_STATE_TOPIC TIME_TO_RECORD

Commanding from CSV

Read from csv file and execute on robot

rosrun ros_control_boilerplate csv_to_controller READ_FROM_FILE_PATH CONTROLLER_STATE_TOPIC TIME_TO_RECORD

Commanding from Keyboard

Joint-level teleop from a keyboard (TODO: remove had coded topic names)

rosrun ros_control_boilerplate keyboard_teleop

Limitations

  • Does not implement estops, transmissions, or other fancy new features of ros_control
  • Does not have any hard realtime code, this depends largely on your platform, kernel, OS, etc
  • Only position control is fully implemented, though some code is in place for velocity control

Contribute

Please add features, make corrections, and address the limitations above, thanks!

More Repositories

1

rviz_visual_tools

C++ API wrapper for displaying shapes and meshes in Rviz
C++
747
star
2

generate_parameter_library

Declarative ROS 2 Parameters
Python
228
star
3

roscpp_code_format

Auto formatting script for ROS C++ Style Guidelines
226
star
4

data_tamer

C++ library for Fearless Timeseries Logging
C++
196
star
5

deep_grasp_demo

Deep learning for grasp detection within MoveIt.
C++
104
star
6

abb_ros2

C++
86
star
7

pick_ik

Inverse Kinematics solver for MoveIt
C++
68
star
8

topic_based_ros2_control

ros2_control hardware interface that uses topics to command the robot and publish its state
C++
58
star
9

tf_visual_tools

Manually manipulate TFs in ROS using this Rviz plugin.
C++
51
star
10

ros2_robotiq_gripper

C++
48
star
11

RSL

ROS Support Library
C++
46
star
12

rosparam_shortcuts

Quickly load variables from rosparam with good command line error checking.
C++
38
star
13

descartes_capability

Drop-in capability for MoveIt's move_group that uses Descartes
C++
37
star
14

ros_testing_templates

C++
28
star
15

tf_keyboard_cal

Allows manual control of a TF through the keyboard or interactive markers
C++
27
star
16

quick-ros-install

Instant install script for ROS
Shell
25
star
17

ros2_package_template

A ROS2 package cookiecutter template
C++
22
star
18

moveit_studio_ur_ws

Workspace containing example MoveIt Studio configuration packages.
C++
21
star
19

UR10e_welding_demo

C++
21
star
20

crac_build_system

The unified Catin / ROSBuild / Ament / Colcon build system
Shell
21
star
21

snowbot_operating_system

The weather outside is frightful
C++
18
star
22

moveit_sim_controller

A simulation interface for a hardware interface for ros_control, and loads default joint values from SRDF
C++
14
star
23

ik_benchmarking

Utilities for IK solver benchmarking with MoveIt 2
C++
13
star
24

moveit_shelf_picking

Benchmarking suite for dual arm manipulation
C++
12
star
25

ros2_epick_gripper

ROS2 driver for the Robotiq EPick gripper.
C++
11
star
26

ROStoROS2

A living documentation of automate-able and manual steps for porting ROS packages to ROS2
10
star
27

moveit_studio_sdk

MoveIt Studio SDK
Python
9
star
28

trackjoint

C++
9
star
29

ros_reflexxes

Reflexxes Type II provides acceleration-limited trajectory smoothing
C++
9
star
30

ruckig_traj_smoothing

A jerk-limited trajectory smoothing plugin
8
star
31

graph_msgs

ROS messages for publishing graphs of different data types
CMake
8
star
32

launch_param_builder

Python library for loading parameters in launch files
Python
8
star
33

moveit_boilerplate

Basic functionality for easily building applications on MoveIt! in C++
C++
6
star
34

stretch_moveit_plugins

Package for the inverse kinematics solver for stretch from Hello Robot Inc.
C++
5
star
35

tool_changing

MoveGroup capability to dynamically change end-effectors
C++
4
star
36

test_examples

Examples of different test techniques (integration, unit, gtest, dependency injection...)
Python
4
star
37

moveit_studio_example_behaviors

C++
4
star
38

CMakeGuidelines

Collection of useful cmake tips
4
star
39

moveit_differential_ik_plugin

A plugin to provide differential kinematics. Used in admittance control.
C++
4
star
40

pronto

C++
4
star
41

light_painting_demo

C++
3
star
42

cpp_polyfills

Vendored Pollyfills for C++
C++
3
star
43

ocs2_robotic_assets

CMake
2
star
44

rqt2_setup

2
star
45

Moveit2_Tutorials

test deployment of moveit 2 tutorials
HTML
2
star
46

cartesian_msgs-release

1
star
47

moveit_sim_controller-release

1
star
48

ros_control_boilerplate-release

1
star
49

cirs_girona_cala_viuda

ROS2 version of girona cala viuda dataset
Python
1
star
50

picknik_controllers

PickNik's ros2_controllers
C++
1
star
51

rviz_visual_tools-release

1
star
52

rosparam_shortcuts-release

1
star
53

tf_keyboard_cal-release

1
star
54

rqt2_demo_nodes

Python
1
star
55

picknik_accessories

Various accessories used for studio configuration packages
CMake
1
star
56

moveit_studio_kortex_ws

C++
1
star
57

moveit_camera_survey

Code for survey of RGB-D cameras for manipulation
Dockerfile
1
star
58

picknik_ur5_moveit_config

CMake
1
star
59

beta_moveit_website

Demo site for major changes to moveit.ros.org. Found at http://moveit_beta.picknik.ai/
JavaScript
1
star
60

robot_on_rails

MoveIt Studio package for a UR robot on a linear rail
C++
1
star
61

c3pzero

Python
1
star
62

picknik_ament_copyright

Python
1
star
63

boost_sml

State Machine Library ROS Package
C++
1
star
64

cartesian_msgs

Experimental messages for sending Cartesian commands to a robot.
CMake
1
star