ros_control_boilerplate package from ros_control_boilerplate reporos_control_boilerplate |
|
Package Summary
Tags | No category tags. |
Version | 0.6.1 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/PickNikRobotics/ros_control_boilerplate.git |
VCS Type | git |
VCS Version | noetic-devel |
Last Updated | 2021-07-10 |
Dev Status | MAINTAINED |
CI status | Continuous Integration : 0 / 0 |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Dave Coleman
Authors
- Dave Coleman
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 projects@picknik.ai 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:
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!
Changelog for package ros_control_boilerplate
0.6.1 (2021-02-23)
- Increase required cmake version to fix CMake CMP0048 warning
- Replaced boost with std shared_ptr
- Make NodeHandle a const reference
- test_trajectory: Read joints list from trajectory controller params
- Increase num AsyncSpinners where control loops are instantiated
- Contributors: AndyZe, Dave Coleman, John Morris, Ramon Wijnands, Robert Wilbrandt, Tim
Wiki Tutorials
Source Tutorials
Package Dependencies
System Dependencies
Name |
---|
libgflags-dev |
Launch files
- rrbot_control/launch/rrbot_simulation.launch
-
- debug [default: false]
- rrbot_control/launch/rrbot_visualize.launch
- rrbot_control/launch/rrbot_hardware.launch
-
- debug [default: false]
- rrbot_control/launch/rrbot_test_trajectory.launch
-
- debug [default: false]
Messages
Services
Plugins
Recent questions tagged ros_control_boilerplate at Robotics Stack Exchange
ros_control_boilerplate package from ros_control_boilerplate reporos_control_boilerplate |
|
Package Summary
Tags | No category tags. |
Version | 0.5.2 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/PickNikRobotics/ros_control_boilerplate.git |
VCS Type | git |
VCS Version | melodic-devel |
Last Updated | 2021-07-10 |
Dev Status | MAINTAINED |
CI status | Continuous Integration : 0 / 0 |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Dave Coleman
Authors
- Dave Coleman
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 projects@picknik.ai 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:
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!
Changelog for package ros_control_boilerplate
0.5.2 (2021-03-16)
- Revert \"Replaced boost with std shared_ptr\" This reverts commit 9fa14cd3d00328efa3d44d7bf4d849ce909310f0.
- Contributors: JafarAbdi
0.5.1 (2021-02-23)
- Replaced boost with std shared_ptr
- Make NodeHandle a const reference
- test_trajectory: Read joints list from trajectory controller params
- Generalize GenericHWControlLoop to all types of RobotHW (#38)
- Increase num AsyncSpinners where control loops are instantiated
- Contributors: AndyZe, Dave Coleman, Jafar Abdi, John Morris, Ramon Wijnands, Robert Wilbrandt, RobertWilbrandt, Tim
Wiki Tutorials
Source Tutorials
Package Dependencies
System Dependencies
Name |
---|
libgflags-dev |
Launch files
- rrbot_control/launch/rrbot_simulation.launch
-
- debug [default: false]
- rrbot_control/launch/rrbot_visualize.launch
- rrbot_control/launch/rrbot_hardware.launch
-
- debug [default: false]
- rrbot_control/launch/rrbot_test_trajectory.launch
-
- debug [default: false]