Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rrbot demo an independent package #27

Open
wants to merge 5 commits into
base: kinetic-devel
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -2,6 +2,18 @@
Changelog for package ros_control_boilerplate
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.5.0 (2019-01-28)
------------------
* Fix `catkin lint` warnings
* Remove obsolete `FindGflags.cmake` script
* Move `ros_control_boilerplate`, obscuring rrbot demo package, into
own subdirectory
* Package `rrbot_control` name conflicts with `gazebo_ros_demos` repo
package; rename to `rrbot_control_boilerplate`
* Make `rrbot_control_boilerplate` independent package; install launch
and config files for reuse by other packages
* Update URLs in `package.xml` files

0.4.1 (2017-06-20)
------------------
* Changed boost::shared_ptr to typedef for Lunar support
52 changes: 0 additions & 52 deletions cmake/FindGflags.cmake

This file was deleted.

47 changes: 22 additions & 25 deletions CMakeLists.txt → ros_control_boilerplate/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -2,26 +2,25 @@ cmake_minimum_required(VERSION 2.8.3)
project(ros_control_boilerplate)

# C++ 11
set(CMAKE_CXX_FLAGS "-std=c++11 -Wall ${CMAKE_CXX_FLAGS}")
add_compile_options(-std=c++11 -Wall)

find_package(catkin REQUIRED COMPONENTS
actionlib
cmake_modules
hardware_interface
control_msgs
control_toolbox
controller_manager
hardware_interface
joint_limits_interface
roscpp
control_msgs
rosparam_shortcuts
sensor_msgs
std_msgs
trajectory_msgs
actionlib
urdf
joint_limits_interface
transmission_interface
control_toolbox
std_msgs
sensor_msgs
rosparam_shortcuts
urdf
)

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake)
find_package(Gflags REQUIRED)

## System dependencies are found with CMake's conventions
@@ -31,18 +30,18 @@ catkin_package(
INCLUDE_DIRS
include
CATKIN_DEPENDS
hardware_interface
control_msgs
control_toolbox
controller_manager
hardware_interface
joint_limits_interface
roscpp
control_msgs
rosparam_shortcuts
sensor_msgs
std_msgs
trajectory_msgs
urdf
joint_limits_interface
transmission_interface
control_toolbox
std_msgs
sensor_msgs
rosparam_shortcuts
urdf
LIBRARIES
generic_hw_control_loop
generic_hw_interface
@@ -133,28 +132,26 @@ target_link_libraries(${PROJECT_NAME}_keyboard_teleop
${catkin_LIBRARIES}
)

add_subdirectory(rrbot_control)

## Install ------------------------------------------------------------

# Install libraries
install(TARGETS
controller_to_csv
csv_to_controller
generic_hw_control_loop
generic_hw_interface
sim_hw_interface
controller_to_csv
csv_to_controller
LIBRARY DESTINATION
${CATKIN_PACKAGE_LIB_DESTINATION}
)

# Install executables
install(TARGETS
${PROJECT_NAME}_sim_hw_main
${PROJECT_NAME}_test_trajectory
${PROJECT_NAME}_controller_to_csv_main
${PROJECT_NAME}_csv_to_controller_main
${PROJECT_NAME}_keyboard_teleop
${PROJECT_NAME}_sim_hw_main
${PROJECT_NAME}_test_trajectory
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
6 changes: 3 additions & 3 deletions package.xml → ros_control_boilerplate/package.xml
Original file line number Diff line number Diff line change
@@ -8,9 +8,9 @@

<license>BSD</license>

<url type="website">https://github.com/davetcoleman/ros_control_boilerplate</url>
<url type="butracker">https://github.com/davetcoleman/ros_control_boilerplate/issues</url>
<url type="repository">https://github.com/davetcoleman/ros_control_boilerplate/</url>
<url type="website">https://github.com/PickNikRobotics/ros_control_boilerplate</url>
<url type="butracker">https://github.com/PickNikRobotics/ros_control_boilerplate/issues</url>
<url type="repository">https://github.com/PickNikRobotics/ros_control_boilerplate/</url>

<author email="[email protected]">Dave Coleman</author>

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,21 +1,40 @@
cmake_minimum_required(VERSION 2.8.3)
project(rrbot_control_boilerplate)

# C++ 11
add_compile_options(-std=c++11 -Wall)

find_package(catkin REQUIRED COMPONENTS
ros_control_boilerplate
)

catkin_package(
INCLUDE_DIRS include
LIBRARIES rrbot_hw_interface
CATKIN_DEPENDS ros_control_boilerplate
)

###########
## Build ##
###########

include_directories(
include/
include
${catkin_INCLUDE_DIRS}
)

# RRBot Hardware Interface
add_library(rrbot_hw_interface
src/rrbot_hw_interface.cpp
)
target_link_libraries(rrbot_hw_interface
generic_hw_interface
${catkin_LIBRARIES}
)

# Main control executable
add_executable(rrbot_hw_main src/rrbot_hw_main.cpp)
target_link_libraries(rrbot_hw_main
rrbot_hw_interface
generic_hw_control_loop
${catkin_LIBRARIES}
)

@@ -36,4 +55,12 @@ install(TARGETS
)

# Install header files
install(DIRECTORY include/rrbot_control/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
install(
DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(DIRECTORY config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -37,12 +37,12 @@
For a more detailed simulation example, see sim_hw_interface.h
*/

#ifndef RRBOT_CONTROL__RRBOT_HW_INTERFACE_H
#define RRBOT_CONTROL__RRBOT_HW_INTERFACE_H
#ifndef RRBOT_CONTROL_BOILERPLATE__RRBOT_HW_INTERFACE_H
#define RRBOT_CONTROL_BOILERPLATE__RRBOT_HW_INTERFACE_H

#include <ros_control_boilerplate/generic_hw_interface.h>

namespace rrbot_control
namespace rrbot_control_boilerplate
{

/// \brief Hardware interface for a robot
Original file line number Diff line number Diff line change
@@ -16,7 +16,9 @@
output="screen" launch-prefix="$(arg launch_prefix)"/>

<!-- Load controller settings -->
<rosparam file="$(find ros_control_boilerplate)/rrbot_control/config/rrbot_controllers.yaml" command="load"/>
<rosparam
file="$(find rrbot_control_boilerplate)/config/rrbot_controllers.yaml"
command="load"/>

<!-- Load controller manager -->
<node name="ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false"
Original file line number Diff line number Diff line change
@@ -16,7 +16,9 @@
output="screen" launch-prefix="$(arg launch_prefix)"/>

<!-- Load controller settings -->
<rosparam file="$(find ros_control_boilerplate)/rrbot_control/config/rrbot_controllers.yaml" command="load"/>
<rosparam
file="$(find rrbot_control_boilerplate)/config/rrbot_controllers.yaml"
command="load"/>

<!-- Load controller manager -->
<node name="ros_control_controller_manager" pkg="controller_manager" type="controller_manager" respawn="false"
Original file line number Diff line number Diff line change
@@ -12,7 +12,9 @@
<node name="test_trajectory" pkg="ros_control_boilerplate" type="test_trajectory"
output="screen" launch-prefix="$(arg launch_prefix)">
<param name="action_topic" value="/rrbot/position_trajectory_controller/follow_joint_trajectory/"/>
<rosparam file="$(find ros_control_boilerplate)/rrbot_control/config/rrbot_controllers.yaml" command="load"/>
<rosparam
file="$(find rrbot_control_boilerplate)/config/rrbot_controllers.yaml"
command="load"/>
</node>

</group>
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?xml version="1.0"?>
<package>
<name>rrbot_control</name>
<name>rrbot_control_boilerplate</name>
<version>0.0.1</version>
<description>Simple simulation interface and template for setting up a hardware interface for rrbot</description>

<maintainer email="[email protected]">Someone</maintainer>

<license>BSD</license>

<url type="website">https://github.com/davetcoleman/ros_control_boilerplate</url>
<url type="butracker">https://github.com/davetcoleman/ros_control_boilerplate/issues</url>
<url type="repository">https://github.com/davetcoleman/ros_control_boilerplate/</url>
<url type="website">https://github.com/PickNikRobotics/ros_control_boilerplate</url>
<url type="butracker">https://github.com/PickNikRobotics/ros_control_boilerplate/issues</url>
<url type="repository">https://github.com/PickNikRobotics/ros_control_boilerplate/</url>

<author email="[email protected]">Dave Coleman</author>

Original file line number Diff line number Diff line change
@@ -37,9 +37,9 @@
For a more detailed simulation example, see sim_hw_interface.cpp
*/

#include <rrbot_control/rrbot_hw_interface.h>
#include <rrbot_control_boilerplate/rrbot_hw_interface.h>

namespace rrbot_control
namespace rrbot_control_boilerplate
{

RRBotHWInterface::RRBotHWInterface(ros::NodeHandle &nh, urdf::Model *urdf_model)
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
*/

#include <ros_control_boilerplate/generic_hw_control_loop.h>
#include <rrbot_control/rrbot_hw_interface.h>
#include <rrbot_control_boilerplate/rrbot_hw_interface.h>

int main(int argc, char** argv)
{
@@ -50,8 +50,8 @@ int main(int argc, char** argv)
spinner.start();

// Create the hardware interface specific to your robot
boost::shared_ptr<rrbot_control::RRBotHWInterface> rrbot_hw_interface
(new rrbot_control::RRBotHWInterface(nh));
boost::shared_ptr<rrbot_control_boilerplate::RRBotHWInterface> rrbot_hw_interface
(new rrbot_control_boilerplate::RRBotHWInterface(nh));
rrbot_hw_interface->init();

// Start the control loop