-devel/
-logs/
+install/
+log/
build/
bin/
lib/
# Catkin custom files
CATKIN_IGNORE
+
+# Colcon custom files
+COLCON_IGNORE
-cmake_minimum_required(VERSION 3.0.2)
+cmake_minimum_required(VERSION 3.8)
project(q2d_bringup)
-## Compile as C++11, supported in ROS Kinetic and newer
-# add_compile_options(-std=c++11)
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_compile_options(-Wall -Wextra -Wpedantic)
+endif()
-## Find catkin macros and libraries
-## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
-## is used, also find other catkin packages
-find_package(catkin REQUIRED COMPONENTS
- effort_controllers
- joint_state_controller
-)
-
-## System dependencies are found with CMake's conventions
-# find_package(Boost REQUIRED COMPONENTS system)
-
-
-## Uncomment this if the package has a setup.py. This macro ensures
-## modules and global scripts declared therein get installed
-## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
-# catkin_python_setup()
-
-################################################
-## Declare ROS messages, services and actions ##
-################################################
-
-## To declare and build messages, services or actions from within this
-## package, follow these steps:
-## * Let MSG_DEP_SET be the set of packages whose message types you use in
-## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
-## * In the file package.xml:
-## * add a build_depend tag for "message_generation"
-## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
-## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
-## but can be declared for certainty nonetheless:
-## * add a exec_depend tag for "message_runtime"
-## * In this file (CMakeLists.txt):
-## * add "message_generation" and every package in MSG_DEP_SET to
-## find_package(catkin REQUIRED COMPONENTS ...)
-## * add "message_runtime" and every package in MSG_DEP_SET to
-## catkin_package(CATKIN_DEPENDS ...)
-## * uncomment the add_*_files sections below as needed
-## and list every .msg/.srv/.action file to be processed
-## * uncomment the generate_messages entry below
-## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
-
-## Generate messages in the 'msg' folder
-# add_message_files(
-# FILES
-# Message1.msg
-# Message2.msg
-# )
-
-## Generate services in the 'srv' folder
-# add_service_files(
-# FILES
-# Service1.srv
-# Service2.srv
-# )
+# find dependencies
+find_package(ament_cmake REQUIRED)
+find_package(effort_controllers REQUIRED)
+find_package(joint_state_controller REQUIRED)
-## Generate actions in the 'action' folder
-# add_action_files(
-# FILES
-# Action1.action
-# Action2.action
-# )
-
-## Generate added messages and services with any dependencies listed here
-# generate_messages(
-# DEPENDENCIES
-# std_msgs # Or other packages containing msgs
-# )
-
-################################################
-## Declare ROS dynamic reconfigure parameters ##
-################################################
-
-## To declare and build dynamic reconfigure parameters within this
-## package, follow these steps:
-## * In the file package.xml:
-## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
-## * In this file (CMakeLists.txt):
-## * add "dynamic_reconfigure" to
-## find_package(catkin REQUIRED COMPONENTS ...)
-## * uncomment the "generate_dynamic_reconfigure_options" section below
-## and list every .cfg file to be processed
-
-## Generate dynamic reconfigure parameters in the 'cfg' folder
-# generate_dynamic_reconfigure_options(
-# cfg/DynReconf1.cfg
-# cfg/DynReconf2.cfg
-# )
-
-###################################
-## catkin specific configuration ##
-###################################
-## The catkin_package macro generates cmake config files for your package
-## Declare things to be passed to dependent projects
-## INCLUDE_DIRS: uncomment this if your package contains header files
-## LIBRARIES: libraries you create in this project that dependent projects also need
-## CATKIN_DEPENDS: catkin_packages dependent projects also need
-## DEPENDS: system dependencies of this project that dependent projects also need
-catkin_package(
-# INCLUDE_DIRS include
-# LIBRARIES q2d_bringup
-# CATKIN_DEPENDS effort_controllers joint_state_controller
-# DEPENDS system_lib
+install(DIRECTORY config launch scripts
+ DESTINATION share/${PROJECT_NAME}
)
-###########
-## Build ##
-###########
-
-## Specify additional locations of header files
-## Your package locations should be listed before other locations
-include_directories(
-# include
- ${catkin_INCLUDE_DIRS}
-)
-
-## Declare a C++ library
-# add_library(${PROJECT_NAME}
-# src/${PROJECT_NAME}/q2d_bringup.cpp
-# )
-
-## Add cmake target dependencies of the library
-## as an example, code may need to be generated before libraries
-## either from message generation or dynamic reconfigure
-# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
-
-## Declare a C++ executable
-## With catkin_make all packages are built within a single CMake context
-## The recommended prefix ensures that target names across packages don't collide
-# add_executable(${PROJECT_NAME}_node src/q2d_bringup_node.cpp)
-
-## Rename C++ executable without prefix
-## The above recommended prefix causes long target names, the following renames the
-## target back to the shorter version for ease of user use
-## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
-# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
-
-## Add cmake target dependencies of the executable
-## same as for the library above
-# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
-
-## Specify libraries to link a library or executable target against
-# target_link_libraries(${PROJECT_NAME}_node
-# ${catkin_LIBRARIES}
-# )
-
-#############
-## Install ##
-#############
-
-# all install targets should use catkin DESTINATION variables
-# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
-
-## Mark executable scripts (Python etc.) for installation
-## in contrast to setup.py, you can choose the destination
-# catkin_install_python(PROGRAMS
-# scripts/my_python_script
-# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-# )
-
-## Mark executables for installation
-## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
-# install(TARGETS ${PROJECT_NAME}_node
-# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-# )
-
-## Mark libraries for installation
-## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
-# install(TARGETS ${PROJECT_NAME}
-# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
-# )
-
-## Mark cpp header files for installation
-# install(DIRECTORY include/${PROJECT_NAME}/
-# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-# FILES_MATCHING PATTERN "*.h"
-# PATTERN ".svn" EXCLUDE
-# )
-
-## Mark other files for installation (e.g. launch and bag files, etc.)
-# install(FILES
-# # myfile1
-# # myfile2
-# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
-# )
-
-#############
-## Testing ##
-#############
-## Add gtest based cpp test target and link libraries
-# catkin_add_gtest(${PROJECT_NAME}-test test/test_q2d_bringup.cpp)
-# if(TARGET ${PROJECT_NAME}-test)
-# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
-# endif()
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+ # the following line skips the linter which checks for copyrights
+ # uncomment the line when a copyright and license is not present in all source files
+ #set(ament_cmake_copyright_FOUND TRUE)
+ # the following line skips cpplint (only works in a git repo)
+ # uncomment the line when this package is not in a git repo
+ #set(ament_cmake_cpplint_FOUND TRUE)
+ ament_lint_auto_find_test_dependencies()
+endif()
-## Add folders to be run by python nosetests
-# catkin_add_nosetests(test)
+ament_package()
type: effort_controllers/JointEffortController
joint: elbow_active_joint
-joint_states_publisher:
- type: joint_state_controller/JointStateController
+joint_state_broadcaster:
+ type: joint_state_broadcaster/JointStateBroadcaster
publish_rate: 100
- shoulder_active_joint
- elbow_active_joint
-joint_states_publisher:
- type: joint_state_controller/JointStateController
+joint_state_broadcaster:
+ type: joint_state_broadcaster/JointStateBroadcaster
publish_rate: 100
shoulder_active_joint/pid: {p: 2310, i: 4640, d: 0.299}
elbow_active_joint/pid: {p: 339, i: 851, d: 0.351}
-joint_states_publisher:
- type: joint_state_controller/JointStateController
+joint_state_broadcaster:
+ type: joint_state_broadcaster/JointStateBroadcaster
publish_rate: 100
joint: elbow_active_joint
pid: {p: 339, i: 851, d: 0.351}
-joint_states_publisher:
- type: joint_state_controller/JointStateController
+joint_state_broadcaster:
+ type: joint_state_broadcaster/JointStateBroadcaster
publish_rate: 100
+++ /dev/null
-ijc.launch
\ No newline at end of file
+++ /dev/null
-<launch>
- <arg name="paused" default="true"/>
- <arg name="headless" default="false"/>
- <arg name="use_sim_time" default="true"/>
-
- <arg name="controller" default="pid"/>
- <arg name="config" default="$(find q2d_bringup)/config/$(arg controller).yaml"/>
-
- <include file="$(find q2d_description)/launch/gazebo.launch" >
- <arg name="paused" value="$(arg paused)"/>
- <arg name="headless" value="$(arg headless)"/>
- <arg name="use_sim_time" value="$(arg use_sim_time)"/>
- </include>
-
- <rosparam file="$(arg config)" command="load"/>
-
- <include file="$(find q2d_bringup)/launch/$(arg controller).launch" />
-</launch>
--- /dev/null
+<launch>
+ <arg name="pause" default="true"/>
+ <arg name="gui" default="true"/>
+ <arg name="use_sim_time" default="true"/>
+
+ <arg name="controller" default="pid"/>
+ <arg name="config" default="$(find-pkg-share q2d_bringup)/config/$(var controller).yaml"/>
+
+ <include file="$(find-pkg-share q2d_description)/launch/gazebo.launch.xml" >
+ <arg name="pause" value="$(var pause)"/>
+ <arg name="gui" value="$(var gui)"/>
+ <arg name="use_sim_time" value="$(var use_sim_time)"/>
+ </include>
+
+
+ <include file="$(find-pkg-share q2d_bringup)/launch/$(arg controller).launch.xml" >
+ <arg name="controller" value="$(var controller)"/>
+ <arg name="config" value="$(var config)"/>
+ </include>
+</launch>
+++ /dev/null
-group_ijc.launch
\ No newline at end of file
+++ /dev/null
-<launch>
- <node name="controller_spawner" pkg="controller_manager"
- type="spawner" respawn="false" output="screen"
- args="group_controller joint_states_publisher" />
-</launch>
--- /dev/null
+<launch>
+ <arg name="controller" default="group_pid"/>
+ <arg name="config" default="$(find-pkg-share q2d_bringup)/config/$(var controller).yaml"/>
+
+ <node name="controller_spawner" pkg="controller_manager"
+ exec="spawner" output="screen"
+ args="group_controller joint_states_broadcaster">
+ <param from="$(var config)"/>
+ </node>
+</launch>
+++ /dev/null
-group_ijc.launch
\ No newline at end of file
+++ /dev/null
-<launch>
- <node name="controller_spawner" pkg="controller_manager"
- type="spawner" respawn="false" output="screen"
- args="shoulder_controller elbow_controller joint_states_publisher" />
-</launch>
--- /dev/null
+<launch>
+ <node name="controller_spawner" pkg="controller_manager"
+ exec="spawner" output="screen"
+ args="shoulder_controller elbow_controller joint_states_broadcaster">
+ <param from="$(var config)"/>
+ </nodde>
+</launch>
+++ /dev/null
-ijc.launch
\ No newline at end of file
<?xml version="1.0"?>
-<package format="2">
+<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="3">
<name>q2d_bringup</name>
- <version>2.1.0</version>
+ <version>3.0.0</version>
<description>The q2d_bringup package</description>
-
- <!-- One maintainer tag required, multiple allowed, one person per tag -->
- <!-- Example: -->
- <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
- <maintainer email="fetter@ece.ufrgs.br">Walter Fetter Lages</maintainer>
-
-
- <!-- One license tag required, multiple allowed, one license per tag -->
- <!-- Commonly used license strings: -->
- <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
+ <maintainer email="fetter@ece.ufrgs.br">Walter Fetter Lages</maintainer>
<license>GPLv3</license>
+ <buildtool_depend>ament_cmake</buildtool_depend>
- <!-- Url tags are optional, but multiple are allowed, one per tag -->
- <!-- Optional attribute type can be: website, bugtracker, or repository -->
- <!-- Example: -->
- <!-- <url type="website">http://wiki.ros.org/q2d_bringup</url> -->
-
+ <depend>effort_controllers</depend>
+ <depend>joint_state_controller</depend>
- <!-- Author tags are optional, multiple are allowed, one per tag -->
- <!-- Authors do not have to be maintainers, but could be -->
- <!-- Example: -->
- <!-- <author email="jane.doe@example.com">Jane Doe</author> -->
- <author email="fetter@ece.ufrgs.br">Walter Fetter Lages</author>
+ <test_depend>ament_lint_auto</test_depend>
+ <test_depend>ament_lint_common</test_depend>
-
- <!-- The *depend tags are used to specify dependencies -->
- <!-- Dependencies can be catkin packages or system dependencies -->
- <!-- Examples: -->
- <!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
- <!-- <depend>roscpp</depend> -->
- <!-- Note that this is equivalent to the following: -->
- <!-- <build_depend>roscpp</build_depend> -->
- <!-- <exec_depend>roscpp</exec_depend> -->
- <!-- Use build_depend for packages you need at compile time: -->
- <!-- <build_depend>message_generation</build_depend> -->
- <!-- Use build_export_depend for packages you need in order to build against this package: -->
- <!-- <build_export_depend>message_generation</build_export_depend> -->
- <!-- Use buildtool_depend for build tool packages: -->
- <!-- <buildtool_depend>catkin</buildtool_depend> -->
- <!-- Use exec_depend for packages you need at runtime: -->
- <!-- <exec_depend>message_runtime</exec_depend> -->
- <!-- Use test_depend for packages you need only for testing: -->
- <!-- <test_depend>gtest</test_depend> -->
- <!-- Use doc_depend for packages you need only for building documentation: -->
- <!-- <doc_depend>doxygen</doc_depend> -->
- <buildtool_depend>catkin</buildtool_depend>
- <build_depend>effort_controllers</build_depend>
- <build_depend>joint_state_controller</build_depend>
- <build_export_depend>effort_controllers</build_export_depend>
- <build_export_depend>joint_state_controller</build_export_depend>
- <exec_depend>effort_controllers</exec_depend>
- <exec_depend>joint_state_controller</exec_depend>
-
-
- <!-- The export tag contains other, unspecified, tags -->
<export>
- <!-- Other tools can request additional information be placed here -->
-
+ <build_type>ament_cmake</build_type>
</export>
</package>
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
-import time
-import rospy
+import rclpy
+from rclpy.node import Node
from std_msgs.msg import Float64
-def square():
- if len(sys.argv) < 5:
- print 'square.py topic min max period'
- exit()
- ref=Float64()
+class SquarePublisher(Node):
- pub=rospy.Publisher(sys.argv[1],Float64,queue_size=1)
-
- rospy.init_node('square',anonymous=True)
+ def __init__(self):
+ super().__init__('square_publisher')
+ self.publisher_=self.create_publisher(Float64,sys.argv[1],1)
+ timer_period=float(sys.argv[4])
+ self.timer=self.create_timer(timer_period,self.timer_callback)
+ self.turn=True;
- while True:
- ref.data=float(sys.argv[2]);
- pub.publish(ref)
- time.sleep(float(sys.argv[4]))
+ def timer_callback(self):
+ ref=Float64()
+ ref.data=float(sys.argv[2] if self.turn else sys.argv[3])
+ self.turn=not self.turn
+ self.publisher_.publish(ref)
- ref.data=float(sys.argv[3]);
- pub.publish(ref)
- time.sleep(float(sys.argv[4]))
+def main(args=None):
+ if len(sys.argv) < 5:
+ print('square.py topic min max period')
+ exit()
+
+ rclpy.init(args=args)
+
+ square_publisher=SquarePublisher()
+ rclpy.spin(square_publisher)
+
+ square_publisher.destroy_node()
+ rclpy.shutdown()
+
if __name__ == '__main__':
- try:
- square()
- except rospy.ROSInterruptException:
- pass
+ main()
#!/bin/bash
-rostopic pub /shoulder_controller/command std_msgs/Float64 "{data: $1}" -1 &
-rostopic pub /elbow_controller/command std_msgs/Float64 "{data: $2}" -1
+ros2 topic pub /shoulder_controller/command std_msgs/msg/Float64 "{data: $1}" -1 &
+ros2 topic pub /elbow_controller/command std_msgs/msg/Float64 "{data: $2}" -1
-cmake_minimum_required(VERSION 3.0.2)
+cmake_minimum_required(VERSION 3.8)
project(q2d_description)
-## Compile as C++11, supported in ROS Kinetic and newer
-# add_compile_options(-std=c++11)
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_compile_options(-Wall -Wextra -Wpedantic)
+endif()
-## Find catkin macros and libraries
-## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
-## is used, also find other catkin packages
-find_package(catkin REQUIRED)
+# find dependencies
+find_package(ament_cmake REQUIRED)
+# uncomment the following section in order to fill in
+# further dependencies manually.
+# find_package(<dependency> REQUIRED)
-## System dependencies are found with CMake's conventions
-# find_package(Boost REQUIRED COMPONENTS system)
-
-
-## Uncomment this if the package has a setup.py. This macro ensures
-## modules and global scripts declared therein get installed
-## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
-# catkin_python_setup()
-
-################################################
-## Declare ROS messages, services and actions ##
-################################################
-
-## To declare and build messages, services or actions from within this
-## package, follow these steps:
-## * Let MSG_DEP_SET be the set of packages whose message types you use in
-## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
-## * In the file package.xml:
-## * add a build_depend tag for "message_generation"
-## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
-## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
-## but can be declared for certainty nonetheless:
-## * add a exec_depend tag for "message_runtime"
-## * In this file (CMakeLists.txt):
-## * add "message_generation" and every package in MSG_DEP_SET to
-## find_package(catkin REQUIRED COMPONENTS ...)
-## * add "message_runtime" and every package in MSG_DEP_SET to
-## catkin_package(CATKIN_DEPENDS ...)
-## * uncomment the add_*_files sections below as needed
-## and list every .msg/.srv/.action file to be processed
-## * uncomment the generate_messages entry below
-## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
-
-## Generate messages in the 'msg' folder
-# add_message_files(
-# FILES
-# Message1.msg
-# Message2.msg
-# )
-
-## Generate services in the 'srv' folder
-# add_service_files(
-# FILES
-# Service1.srv
-# Service2.srv
-# )
-
-## Generate actions in the 'action' folder
-# add_action_files(
-# FILES
-# Action1.action
-# Action2.action
-# )
-
-## Generate added messages and services with any dependencies listed here
-# generate_messages(
-# DEPENDENCIES
-# std_msgs # Or other packages containing msgs
-# )
-
-################################################
-## Declare ROS dynamic reconfigure parameters ##
-################################################
-
-## To declare and build dynamic reconfigure parameters within this
-## package, follow these steps:
-## * In the file package.xml:
-## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
-## * In this file (CMakeLists.txt):
-## * add "dynamic_reconfigure" to
-## find_package(catkin REQUIRED COMPONENTS ...)
-## * uncomment the "generate_dynamic_reconfigure_options" section below
-## and list every .cfg file to be processed
-
-## Generate dynamic reconfigure parameters in the 'cfg' folder
-# generate_dynamic_reconfigure_options(
-# cfg/DynReconf1.cfg
-# cfg/DynReconf2.cfg
-# )
-
-###################################
-## catkin specific configuration ##
-###################################
-## The catkin_package macro generates cmake config files for your package
-## Declare things to be passed to dependent projects
-## INCLUDE_DIRS: uncomment this if your package contains header files
-## LIBRARIES: libraries you create in this project that dependent projects also need
-## CATKIN_DEPENDS: catkin_packages dependent projects also need
-## DEPENDS: system dependencies of this project that dependent projects also need
-catkin_package(
-# INCLUDE_DIRS include
-# LIBRARIES q2d_description
-# CATKIN_DEPENDS other_catkin_pkg
-# DEPENDS system_lib
-)
-
-###########
-## Build ##
-###########
-
-## Specify additional locations of header files
-## Your package locations should be listed before other locations
-include_directories(
-# include
-# ${catkin_INCLUDE_DIRS}
+install(DIRECTORY launch urdf meshes rviz
+ DESTINATION share/${PROJECT_NAME}
)
-## Declare a C++ library
-# add_library(${PROJECT_NAME}
-# src/${PROJECT_NAME}/q2d_description.cpp
-# )
-
-## Add cmake target dependencies of the library
-## as an example, code may need to be generated before libraries
-## either from message generation or dynamic reconfigure
-# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
-
-## Declare a C++ executable
-## With catkin_make all packages are built within a single CMake context
-## The recommended prefix ensures that target names across packages don't collide
-# add_executable(${PROJECT_NAME}_node src/q2d_description_node.cpp)
-
-## Rename C++ executable without prefix
-## The above recommended prefix causes long target names, the following renames the
-## target back to the shorter version for ease of user use
-## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
-# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
-
-## Add cmake target dependencies of the executable
-## same as for the library above
-# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
-
-## Specify libraries to link a library or executable target against
-# target_link_libraries(${PROJECT_NAME}_node
-# ${catkin_LIBRARIES}
-# )
-
-#############
-## Install ##
-#############
-
-# all install targets should use catkin DESTINATION variables
-# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
-
-## Mark executable scripts (Python etc.) for installation
-## in contrast to setup.py, you can choose the destination
-# catkin_install_python(PROGRAMS
-# scripts/my_python_script
-# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-# )
-
-## Mark executables for installation
-## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
-# install(TARGETS ${PROJECT_NAME}_node
-# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-# )
-
-## Mark libraries for installation
-## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
-# install(TARGETS ${PROJECT_NAME}
-# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
-# )
-
-## Mark cpp header files for installation
-# install(DIRECTORY include/${PROJECT_NAME}/
-# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-# FILES_MATCHING PATTERN "*.h"
-# PATTERN ".svn" EXCLUDE
-# )
-
-## Mark other files for installation (e.g. launch and bag files, etc.)
-# install(FILES
-# # myfile1
-# # myfile2
-# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
-# )
-
-#############
-## Testing ##
-#############
-
-## Add gtest based cpp test target and link libraries
-# catkin_add_gtest(${PROJECT_NAME}-test test/test_q2d_description.cpp)
-# if(TARGET ${PROJECT_NAME}-test)
-# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
-# endif()
-
-## Add folders to be run by python nosetests
-# catkin_add_nosetests(test)
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+ # the following line skips the linter which checks for copyrights
+ # uncomment the line when a copyright and license is not present in all source files
+ #set(ament_cmake_copyright_FOUND TRUE)
+ # the following line skips cpplint (only works in a git repo)
+ # uncomment the line when this package is not in a git repo
+ #set(ament_cmake_cpplint_FOUND TRUE)
+ ament_lint_auto_find_test_dependencies()
+endif()
+
+ament_package()
+++ /dev/null
-<launch>
- <arg name="use_gui" default="false"/>
- <include file="$(find q2d_description)/launch/q2d.launch" />
- <node pkg="tf2_ros" type="static_transform_publisher" name="q2d_origin_publisher" args="0 0 0 0 0 0 1 map origin_link" />
- <node if="$(arg use_gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" type="joint_state_publisher_gui" />
- <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
- <node name="rviz" pkg="rviz" type="rviz" args="-d $(find q2d_description)/rviz/display.rviz" required="true" />
-</launch>
--- /dev/null
+import os
+from ament_index_python.packages import get_package_share_directory
+from launch import LaunchDescription
+from launch.actions import DeclareLaunchArgument
+from launch.substitutions import LaunchConfiguration
+from launch.conditions import IfCondition
+from launch_ros.actions import Node
+
+def generate_launch_description():
+
+ use_gui=LaunchConfiguration('use_gui',default='false')
+
+ urdf_file_name = 'urdf/q2d.urdf'
+ urdf_path=os.path.join(get_package_share_directory('q2d_description'),urdf_file_name)
+ with open(urdf_path,'r') as infp:
+ robot_desc=infp.read()
+
+ rviz_file_name = 'rviz/display.rviz'
+ rviz_path=os.path.join(get_package_share_directory('q2d_description'),rviz_file_name)
+
+ return LaunchDescription([
+ DeclareLaunchArgument(
+ 'use_gui',
+ default_value='false',
+ description='Use graphical user interface to publish jointstates if true'),
+ Node(
+ package='tf2_ros',
+ executable='static_transform_publisher',
+ name='q2d_origin_publisher',
+ arguments=["0","0","0","0","0","0","1","map","origin_link"]),
+ Node(
+ package='joint_state_publisher_gui',
+ executable='joint_state_publisher_gui',
+ name='joint_state_publisher',
+ condition=IfCondition(LaunchConfiguration("use_gui"))),
+ Node(
+ package='robot_state_publisher',
+ executable='robot_state_publisher',
+ name='robot_state_publisher',
+ parameters=[{'robot_description': robot_desc}],
+ arguments=[urdf_path]),
+ Node(
+ package='rviz2',
+ executable='rviz2',
+ name='rviz',
+ arguments=["-d", rviz_path])
+ ])
--- /dev/null
+<launch>
+ <arg name="use_gui" default="false"/>
+ <node pkg="tf2_ros" exec="static_transform_publisher" name="q2d_origin_publisher" args="0 0 0 0 0 0 1 map origin_link" />
+ <node if="$(var use_gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" exec="joint_state_publisher_gui" />
+ <include file="$(find-pkg-share q2d_description)/launch/q2d.launch.xml"/>
+ <node name="rviz" pkg="rviz2" exec="rviz2" args="-d $(find-pkg-share q2d_description)/rviz/display.rviz" />
+</launch>
+++ /dev/null
-<launch>
- <arg name="paused" default="true"/>
- <arg name="headless" default="false"/>
- <arg name="use_sim_time" default="true"/>
-
- <include file="$(find gazebo_ros)/launch/empty_world.launch">
- <arg name="paused" value="$(arg paused)"/>
- <arg name="headless" value="$(arg headless)"/>
- <arg name="use_sim_time" value="$(arg use_sim_time)"/>
- <arg name="world_name" value="worlds/empty_sky.world" />
- </include>
-
- <include file="$(find q2d_description)/launch/q2d.launch" />
-
- <node name="q2d_spawner" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -model q2d" respawn="false" output="screen" />
-</launch>
--- /dev/null
+<launch>
+ <arg name="pause" default="true"/>
+ <arg name="gui" default="true"/>
+ <arg name="use_sim_time" default="true"/>
+
+ <set_env name="GAZEBO_MODEL_PATH" value="$(env GAZEBO_MODEL_PATH):$(find-pkg-prefix q2d_description)/share/"/>
+
+ <include file="$(find-pkg-share gazebo_ros)/launch/gazebo.launch.py">
+ <arg name="pause" value="$(var pause)"/>
+ <arg name="gui" value="$(var gui)"/>
+ <arg name="use_sim_time" value="$(var use_sim_time)"/>
+ <arg name="world" value="worlds/empty_sky.world" />
+ </include>
+
+ <include file="$(find-pkg-share q2d_description)/launch/q2d.launch.xml"/>
+
+ <node name="q2d_spawner" pkg="gazebo_ros" exec="spawn_entity.py" args="-topic robot_description -entity q2d" />
+</launch>
+++ /dev/null
-<launch>
- <param name="robot_description" textfile="$(find q2d_description)/urdf/q2d.urdf" />
-</launch>
--- /dev/null
+<launch>
+ <node name="robot_state_publisher" pkg="robot_state_publisher" exec="robot_state_publisher">
+ <param name="robot_description" value="$(command 'cat $(find-pkg-share q2d_description)/urdf/q2d.urdf')" type="str"/>
+ </node>
+</launch>
<?xml version="1.0"?>
-<package format="2">
+<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="3">
<name>q2d_description</name>
- <version>2.1.0</version>
+ <version>3.0.0</version>
<description>The q2d_description package</description>
-
- <!-- One maintainer tag required, multiple allowed, one person per tag -->
- <!-- Example: -->
- <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
- <maintainer email="fetter@ee.ufrgs.br">Walter Fetter Lages</maintainer>
-
- <!-- One license tag required, multiple allowed, one license per tag -->
- <!-- Commonly used license strings: -->
- <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
+ <maintainer email="fetter@ece.ufrgs.br">Walter Fetter Lages</maintainer>
<license>GPLv3</license>
+ <buildtool_depend>ament_cmake</buildtool_depend>
- <!-- Url tags are optional, but multiple are allowed, one per tag -->
- <!-- Optional attribute type can be: website, bugtracker, or repository -->
- <!-- Example: -->
- <!-- <url type="website">http://wiki.ros.org/q2d_description</url> -->
-
-
- <!-- Author tags are optional, multiple are allowed, one per tag -->
- <!-- Authors do not have to be maintainers, but could be -->
- <!-- Example: -->
- <!-- <author email="jane.doe@example.com">Jane Doe</author> -->
- <author email="gui.a.ritter@gmail.com">Guilherme Alan Ritter</author>
- <author email="fetter@ece.ufrgs.br">Walter Fetter Lages</author>
+ <test_depend>ament_lint_auto</test_depend>
+ <test_depend>ament_lint_common</test_depend>
-
- <!-- The *depend tags are used to specify dependencies -->
- <!-- Dependencies can be catkin packages or system dependencies -->
- <!-- Examples: -->
- <!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
- <!-- <depend>roscpp</depend> -->
- <!-- Note that this is equivalent to the following: -->
- <!-- <build_depend>roscpp</build_depend> -->
- <!-- <exec_depend>roscpp</exec_depend> -->
- <!-- Use build_depend for packages you need at compile time: -->
- <!-- <build_depend>message_generation</build_depend> -->
- <!-- Use build_export_depend for packages you need in order to build against this package: -->
- <!-- <build_export_depend>message_generation</build_export_depend> -->
- <!-- Use buildtool_depend for build tool packages: -->
- <!-- <buildtool_depend>catkin</buildtool_depend> -->
- <!-- Use exec_depend for packages you need at runtime: -->
- <!-- <exec_depend>message_runtime</exec_depend> -->
- <!-- Use test_depend for packages you need only for testing: -->
- <!-- <test_depend>gtest</test_depend> -->
- <!-- Use doc_depend for packages you need only for building documentation: -->
- <!-- <doc_depend>doxygen</doc_depend> -->
- <buildtool_depend>catkin</buildtool_depend>
-
-
- <!-- The export tag contains other, unspecified, tags -->
<export>
- <!-- Other tools can request additional information be placed here -->
-
+ <build_type>ament_cmake</build_type>
</export>
</package>
Panels:
- - Class: rviz/Displays
- Help Height: 78
+ - Class: rviz_common/Displays
+ Help Height: 87
Name: Displays
Property Tree Widget:
- Expanded:
- - /Global Options1
- - /Status1
+ Expanded: ~
Splitter Ratio: 0.5
- Tree Height: 559
- - Class: rviz/Selection
+ Tree Height: 498
+ - Class: rviz_common/Selection
Name: Selection
- - Class: rviz/Tool Properties
+ - Class: rviz_common/Tool Properties
Expanded:
- - /2D Pose Estimate1
- - /2D Nav Goal1
+ - /2D Goal Pose1
- /Publish Point1
Name: Tool Properties
- Splitter Ratio: 0.588679
- - Class: rviz/Views
+ Splitter Ratio: 0.5886790156364441
+ - Class: rviz_common/Views
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
- - Class: rviz/Time
+ - Class: rviz_common/Time
Experimental: false
Name: Time
SyncMode: 0
Displays:
- Alpha: 0.5
Cell Size: 1
- Class: rviz/Grid
+ Class: rviz_default_plugins/Grid
Color: 160; 160; 164
Enabled: true
Line Style:
- Line Width: 0.03
+ Line Width: 0.029999999329447746
Value: Lines
Name: Grid
Normal Cell Count: 0
Reference Frame: <Fixed Frame>
Value: true
- Alpha: 1
- Class: rviz/RobotModel
+ Class: rviz_default_plugins/RobotModel
Collision Enabled: false
+ Description File: ""
+ Description Source: Topic
+ Description Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /robot_description
Enabled: true
Links:
All Links Enabled: true
Show Axes: false
Show Trail: false
Value: true
- end_link:
- Alpha: 1
- Show Axes: false
- Show Trail: false
origin_link:
Alpha: 1
Show Axes: false
Show Axes: false
Show Trail: false
Value: true
+ tool_link:
+ Alpha: 1
+ Show Axes: false
+ Show Trail: false
Name: RobotModel
- Robot Description: robot_description
TF Prefix: ""
Update Interval: 0
Value: true
Frame Rate: 30
Name: root
Tools:
- - Class: rviz/Interact
+ - Class: rviz_default_plugins/Interact
Hide Inactive Objects: true
- - Class: rviz/MoveCamera
- - Class: rviz/Select
- - Class: rviz/FocusCamera
- - Class: rviz/Measure
- - Class: rviz/SetInitialPose
- Topic: /initialpose
- - Class: rviz/SetGoal
- Topic: /move_base_simple/goal
- - Class: rviz/PublishPoint
+ - Class: rviz_default_plugins/MoveCamera
+ - Class: rviz_default_plugins/Select
+ - Class: rviz_default_plugins/FocusCamera
+ - Class: rviz_default_plugins/Measure
+ Line color: 128; 128; 0
+ - Class: rviz_default_plugins/SetInitialPose
+ Covariance x: 0.25
+ Covariance y: 0.25
+ Covariance yaw: 0.06853891909122467
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /initialpose
+ - Class: rviz_default_plugins/SetGoal
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /goal_pose
+ - Class: rviz_default_plugins/PublishPoint
Single click: true
- Topic: /clicked_point
+ Topic:
+ Depth: 5
+ Durability Policy: Volatile
+ History Policy: Keep Last
+ Reliability Policy: Reliable
+ Value: /clicked_point
+ Transformation:
+ Current:
+ Class: rviz_default_plugins/TF
Value: true
Views:
Current:
- Class: rviz/Orbit
- Distance: 1.74931
+ Class: rviz_default_plugins/Orbit
+ Distance: 2.4995310306549072
Enable Stereo Rendering:
- Stereo Eye Separation: 0.06
+ Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Focal Point:
- X: 0.170924
- Y: -0.214539
- Z: 0.105634
+ X: 0
+ Y: 0
+ Z: 0
+ Focal Shape Fixed Size: true
+ Focal Shape Size: 0.05000000074505806
+ Invert Z Axis: false
Name: Current View
- Near Clip Distance: 0.01
- Pitch: 0.505398
+ Near Clip Distance: 0.009999999776482582
+ Pitch: 0.785398006439209
Target Frame: <Fixed Frame>
Value: Orbit (rviz)
- Yaw: 4.70358
+ Yaw: 0.785398006439209
Saved: ~
Window Geometry:
Displays:
Height: 846
Hide Left Dock: false
Hide Right Dock: false
- QMainWindow State: 000000ff00000000fd00000004000000000000013c000002bafc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005300fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000036000002ba000000b700fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f000002bafc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a005600690065007700730100000036000002ba0000009b00fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000003efc0100000002fb0000000800540069006d00650100000000000004b00000024700fffffffb0000000800540069006d0065010000000000000450000000000000000000000259000002ba00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
+ QMainWindow State: 000000ff00000000fd00000004000000000000016a00000296fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000007901000003fb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000004400000296000000fd01000003fb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000011000000296fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073010000004400000296000000d301000003fb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000004b00000004cfc0100000002fb0000000800540069006d00650100000000000004b0000002ad01000003fb0000000800540069006d00650100000000000004500000000000000000000002340000029600000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
Views:
collapsed: false
Width: 1200
- X: 336
- Y: 94
+ X: 60
+ Y: 60
-cmake_minimum_required(VERSION 3.0.2)
+cmake_minimum_required(VERSION 3.8)
project(q2d_teleop)
-## Compile as C++11, supported in ROS Kinetic and newer
-add_compile_options(-std=c++11)
+if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_compile_options(-Wall -Wextra -Wpedantic)
+endif()
-## Find catkin macros and libraries
-## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
-## is used, also find other catkin packages
-find_package(catkin REQUIRED COMPONENTS
- cmake_modules
- geometry_msgs
- kdl_parser
- roscpp
- sensor_msgs
- std_msgs
- urdf
-)
-
-## System dependencies are found with CMake's conventions
-# find_package(Boost REQUIRED COMPONENTS system)
+# find dependencies
+find_package(ament_cmake REQUIRED)
+find_package(rclcpp REQUIRED)
find_package(Eigen3 REQUIRED)
+find_package(cmake_modules REQUIRED)
+find_package(geometry_msgs REQUIRED)
+find_package(kdl_parser REQUIRED)
find_package(orocos_kdl REQUIRED)
+find_package(sensor_msgs REQUIRED)
+find_package(std_msgs REQUIRED)
+find_package(urdf REQUIRED)
-
-## Uncomment this if the package has a setup.py. This macro ensures
-## modules and global scripts declared therein get installed
-## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
-# catkin_python_setup()
-
-################################################
-## Declare ROS messages, services and actions ##
-################################################
-
-## To declare and build messages, services or actions from within this
-## package, follow these steps:
-## * Let MSG_DEP_SET be the set of packages whose message types you use in
-## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
-## * In the file package.xml:
-## * add a build_depend tag for "message_generation"
-## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET
-## * If MSG_DEP_SET isn't empty the following dependency has been pulled in
-## but can be declared for certainty nonetheless:
-## * add a exec_depend tag for "message_runtime"
-## * In this file (CMakeLists.txt):
-## * add "message_generation" and every package in MSG_DEP_SET to
-## find_package(catkin REQUIRED COMPONENTS ...)
-## * add "message_runtime" and every package in MSG_DEP_SET to
-## catkin_package(CATKIN_DEPENDS ...)
-## * uncomment the add_*_files sections below as needed
-## and list every .msg/.srv/.action file to be processed
-## * uncomment the generate_messages entry below
-## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
-
-## Generate messages in the 'msg' folder
-# add_message_files(
-# FILES
-# Message1.msg
-# Message2.msg
-# )
-
-## Generate services in the 'srv' folder
-# add_service_files(
-# FILES
-# Service1.srv
-# Service2.srv
-# )
-
-## Generate actions in the 'action' folder
-# add_action_files(
-# FILES
-# Action1.action
-# Action2.action
-# )
-
-## Generate added messages and services with any dependencies listed here
-# generate_messages(
-# DEPENDENCIES
-# geometry_msgs# sensor_msgs# std_msgs
-# )
-
-################################################
-## Declare ROS dynamic reconfigure parameters ##
-################################################
-
-## To declare and build dynamic reconfigure parameters within this
-## package, follow these steps:
-## * In the file package.xml:
-## * add a build_depend and a exec_depend tag for "dynamic_reconfigure"
-## * In this file (CMakeLists.txt):
-## * add "dynamic_reconfigure" to
-## find_package(catkin REQUIRED COMPONENTS ...)
-## * uncomment the "generate_dynamic_reconfigure_options" section below
-## and list every .cfg file to be processed
-
-## Generate dynamic reconfigure parameters in the 'cfg' folder
-# generate_dynamic_reconfigure_options(
-# cfg/DynReconf1.cfg
-# cfg/DynReconf2.cfg
-# )
-
-###################################
-## catkin specific configuration ##
-###################################
-## The catkin_package macro generates cmake config files for your package
-## Declare things to be passed to dependent projects
-## INCLUDE_DIRS: uncomment this if your package contains header files
-## LIBRARIES: libraries you create in this project that dependent projects also need
-## CATKIN_DEPENDS: catkin_packages dependent projects also need
-## DEPENDS: system dependencies of this project that dependent projects also need
-catkin_package(
-# INCLUDE_DIRS include
-# LIBRARIES q2d_teleop
-# CATKIN_DEPENDS cmake_modules geometry_msgs kdl_parser roscpp sensor_msgs std_msgs urdf
-# DEPENDS orocos_kdl
-)
-
-###########
-## Build ##
-###########
-
-## Specify additional locations of header files
-## Your package locations should be listed before other locations
-include_directories(
-# include
- ${catkin_INCLUDE_DIRS}
-# TODO: Check names of system library include directories (orocos_kdl)
- ${EIGEN3_INCLUDE_DIRS}
- ${orocos_kdl_INCLUDE_DIRS}
+add_executable(q2d_teleop_tablet src/q2d_teleop_tablet.cpp)
+target_include_directories(q2d_teleop_tablet PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>)
+target_compile_features(q2d_teleop_tablet PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
+ament_target_dependencies(
+ q2d_teleop_tablet
+ "rclcpp"
+ "Eigen3"
+ "cmake_modules"
+ "geometry_msgs"
+ "kdl_parser"
+ "orocos_kdl"
+ "sensor_msgs"
+ "std_msgs"
+ "urdf"
)
-## Declare a C++ library
-# add_library(${PROJECT_NAME}
-# src/${PROJECT_NAME}/q2d_teleop.cpp
-# )
-
-## Add cmake target dependencies of the library
-## as an example, code may need to be generated before libraries
-## either from message generation or dynamic reconfigure
-# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
+install(TARGETS q2d_teleop_tablet
+ DESTINATION lib/${PROJECT_NAME})
-## Declare a C++ executable
-## With catkin_make all packages are built within a single CMake context
-## The recommended prefix ensures that target names across packages don't collide
-add_executable(q2d_teleop_tablet src/q2d_teleop_tablet.cpp)
add_executable(q2d_teleop_rviz src/q2d_teleop_rviz.cpp)
-
-## Rename C++ executable without prefix
-## The above recommended prefix causes long target names, the following renames the
-## target back to the shorter version for ease of user use
-## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node"
-# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "")
-
-## Add cmake target dependencies of the executable
-## same as for the library above
-# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
-
-## Specify libraries to link a library or executable target against
-target_link_libraries(q2d_teleop_tablet
- ${catkin_LIBRARIES}
-# ${Eigen3_LIBRARIES}
- ${orocos_kdl_LIBRARIES}
-)
-
-target_link_libraries(q2d_teleop_rviz
- ${catkin_LIBRARIES}
-# ${Eigen3_LIBRARIES}
- ${orocos_kdl_LIBRARIES}
+target_include_directories(q2d_teleop_rviz PUBLIC
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+ $<INSTALL_INTERFACE:include>)
+target_compile_features(q2d_teleop_rviz PUBLIC c_std_99 cxx_std_17) # Require C99 and C++17
+ament_target_dependencies(
+ q2d_teleop_rviz
+ "rclcpp"
+ "Eigen3"
+ "cmake_modules"
+ "geometry_msgs"
+ "kdl_parser"
+ "orocos_kdl"
+ "sensor_msgs"
+ "std_msgs"
+ "urdf"
)
-#############
-## Install ##
-#############
+install(TARGETS q2d_teleop_rviz
+ DESTINATION lib/${PROJECT_NAME})
-# all install targets should use catkin DESTINATION variables
-# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
-
-## Mark executable scripts (Python etc.) for installation
-## in contrast to setup.py, you can choose the destination
-# catkin_install_python(PROGRAMS
-# scripts/my_python_script
-# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-# )
-
-## Mark executables for installation
-## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_executables.html
-# install(TARGETS ${PROJECT_NAME}_node
-# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-# )
-
-## Mark libraries for installation
-## See http://docs.ros.org/melodic/api/catkin/html/howto/format1/building_libraries.html
-# install(TARGETS ${PROJECT_NAME}
-# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
-# RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION}
-# )
-
-## Mark cpp header files for installation
-# install(DIRECTORY include/${PROJECT_NAME}/
-# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
-# FILES_MATCHING PATTERN "*.h"
-# PATTERN ".svn" EXCLUDE
-# )
-
-## Mark other files for installation (e.g. launch and bag files, etc.)
-# install(FILES
-# # myfile1
-# # myfile2
-# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
-# )
-
-#############
-## Testing ##
-#############
-
-## Add gtest based cpp test target and link libraries
-# catkin_add_gtest(${PROJECT_NAME}-test test/test_q2d_teleop.cpp)
-# if(TARGET ${PROJECT_NAME}-test)
-# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
-# endif()
+install(DIRECTORY launch rviz
+ DESTINATION share/${PROJECT_NAME}
+)
-## Add folders to be run by python nosetests
-# catkin_add_nosetests(test)
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+ # the following line skips the linter which checks for copyrights
+ # uncomment the line when a copyright and license is not present in all source files
+ #set(ament_cmake_copyright_FOUND TRUE)
+ # the following line skips cpplint (only works in a git repo)
+ # uncomment the line when this package is not in a git repo
+ #set(ament_cmake_cpplint_FOUND TRUE)
+ ament_lint_auto_find_test_dependencies()
+endif()
+
+ament_package()
+++ /dev/null
-<launch>
- <include file="$(find q2d_description)/launch/q2d.launch" />
- <node pkg="tf2_ros" type="static_transform_publisher" name="q2d_origin_publisher" args="0 0 0 0 0 0 1 map origin_link" />
- <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
- <node name="rviz" pkg="rviz" type="rviz" args="-d $(find q2d_teleop)/rviz/display.rviz" required="true" />
-</launch>
--- /dev/null
+<launch>
+ <include file="$(find-pkg-share q2d_description)/launch/q2d.launch.xml" />
+ <node pkg="tf2_ros" exec="static_transform_publisher" name="q2d_origin_publisher" args="0 0 0 0 0 0 1 map origin_link" />
+ <node name="rviz" pkg="rviz2" exec="rviz2" args="-d $(find-pkg-share q2d_teleop)/rviz/display.rviz" required="true" />
+</launch>
+++ /dev/null
-<launch>
- <include file="$(find q2d_bringup)/launch/gazebo.launch">
- <arg name="paused" value="false" />
- </include>
-
- <include file="$(find q2d_teleop)/launch/q2d_teleop_tablet.launch" />
-
- <include file="$(find q2d_teleop)/launch/q2d_teleop_rviz.launch" />
-
- <include file="$(find q2d_teleop)/launch/display.launch" />
-
- <include file="$(find gfxtablet_ros)/launch/gfxtablet.launch" />
-</launch>
--- /dev/null
+<launch>
+ <include file="$(find-pkg-share q2d_bringup)/launch/gazebo.launch.xml">
+ <arg name="paused" value="false" />
+ </include>
+
+ <include file="$(find-pkg-share q2d_teleop)/launch/q2d_teleop_tablet.launch.xml" />
+
+ <include file="$(find q2d_teleop)/launch/q2d_teleop_rviz.launch.xml" />
+
+ <include file="$(find q2d_teleop)/launch/display.launch.xml" />
+
+ <include file="$(find gfxtablet_ros)/launch/gfxtablet.launch.xml" />
+</launch>
+++ /dev/null
-<launch>
- <node name="q2d_teleop_rviz" pkg="q2d_teleop" type="q2d_teleop_rviz"
- respawn="false" output="screen" />
-</launch>
--- /dev/null
+<launch>
+ <node name="q2d_teleop_rviz" pkg="q2d_teleop" exec="q2d_teleop_rviz"
+ output="screen" />
+</launch>
+++ /dev/null
-<launch>
- <node name="q2d_teleop_tablet" pkg="q2d_teleop" type="q2d_teleop_tablet"
- respawn="false" output="screen" />
-</launch>
--- /dev/null
+<launch>
+ <node name="q2d_teleop_tablet" pkg="q2d_teleop" exec="q2d_teleop_tablet"
+ output="screen" />
+</launch>
<?xml version="1.0"?>
-<package format="2">
+<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
+<package format="3">
<name>q2d_teleop</name>
- <version>2.1.0</version>
+ <version>3.0.0</version>
<description>The q2d_teleop package</description>
-
- <!-- One maintainer tag required, multiple allowed, one person per tag -->
- <!-- Example: -->
- <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
<maintainer email="fetter@ece.ufrgs.br">Walter Fetter Lages</maintainer>
-
- <!-- One license tag required, multiple allowed, one license per tag -->
- <!-- Commonly used license strings: -->
- <!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
<license>GPLv3</license>
+ <buildtool_depend>ament_cmake</buildtool_depend>
- <!-- Url tags are optional, but multiple are allowed, one per tag -->
- <!-- Optional attribute type can be: website, bugtracker, or repository -->
- <!-- Example: -->
- <!-- <url type="website">http://wiki.ros.org/q2d_teleop</url> -->
-
+ <depend>rclcpp</depend>
+ <depend>Eigen3</depend>
+ <depend>cmake_modules</depend>
+ <depend>geometry_msgs</depend>
+ <depend>kdl_parser</depend>
+ <depend>orocos_kdl</depend>
+ <depend>sensor_msgs</depend>
+ <depend>std_msgs</depend>
+ <depend>urdf</depend>
- <!-- Author tags are optional, multiple are allowed, one per tag -->
- <!-- Authors do not have to be maintainers, but could be -->
- <!-- Example: -->
- <!-- <author email="jane.doe@example.com">Jane Doe</author> -->
- <author email="fetter@ece.ufrgs.br">Walter Fetter Lages</author>
+ <test_depend>ament_lint_auto</test_depend>
+ <test_depend>ament_lint_common</test_depend>
- <!-- The *depend tags are used to specify dependencies -->
- <!-- Dependencies can be catkin packages or system dependencies -->
- <!-- Examples: -->
- <!-- Use depend as a shortcut for packages that are both build and exec dependencies -->
- <!-- <depend>roscpp</depend> -->
- <!-- Note that this is equivalent to the following: -->
- <!-- <build_depend>roscpp</build_depend> -->
- <!-- <exec_depend>roscpp</exec_depend> -->
- <!-- Use build_depend for packages you need at compile time: -->
- <!-- <build_depend>message_generation</build_depend> -->
- <!-- Use build_export_depend for packages you need in order to build against this package: -->
- <!-- <build_export_depend>message_generation</build_export_depend> -->
- <!-- Use buildtool_depend for build tool packages: -->
- <!-- <buildtool_depend>catkin</buildtool_depend> -->
- <!-- Use exec_depend for packages you need at runtime: -->
- <!-- <exec_depend>message_runtime</exec_depend> -->
- <!-- Use test_depend for packages you need only for testing: -->
- <!-- <test_depend>gtest</test_depend> -->
- <!-- Use doc_depend for packages you need only for building documentation: -->
- <!-- <doc_depend>doxygen</doc_depend> -->
- <buildtool_depend>catkin</buildtool_depend>
- <build_depend>Eigen3</build_depend>
- <build_depend>cmake_modules</build_depend>
- <build_depend>geometry_msgs</build_depend>
- <build_depend>kdl_parser</build_depend>
- <build_depend>orocos_kdl</build_depend>
- <build_depend>roscpp</build_depend>
- <build_depend>sensor_msgs</build_depend>
- <build_depend>std_msgs</build_depend>
- <build_depend>urdf</build_depend>
- <build_export_depend>Eigen3</build_export_depend>
- <build_export_depend>cmake_modules</build_export_depend>
- <build_export_depend>geometry_msgs</build_export_depend>
- <build_export_depend>kdl_parser</build_export_depend>
- <build_export_depend>orocos_kdl</build_export_depend>
- <build_export_depend>roscpp</build_export_depend>
- <build_export_depend>sensor_msgs</build_export_depend>
- <build_export_depend>std_msgs</build_export_depend>
- <build_export_depend>urdf</build_export_depend>
- <build_depend>Eigen3</build_depend>
- <exec_depend>cmake_modules</exec_depend>
- <exec_depend>geometry_msgs</exec_depend>
- <exec_depend>kdl_parser</exec_depend>
- <exec_depend>orocos_kdl</exec_depend>
- <exec_depend>roscpp</exec_depend>
- <exec_depend>sensor_msgs</exec_depend>
- <exec_depend>std_msgs</exec_depend>
- <exec_depend>urdf</exec_depend>
-
-
- <!-- The export tag contains other, unspecified, tags -->
<export>
- <!-- Other tools can request additional information be placed here -->
-
+ <build_type>ament_cmake</build_type>
</export>
</package>