Skip to content

Commit

Permalink
Merge pull request #8 from haryngod/dynamic_joy
Browse files Browse the repository at this point in the history
dynamic reconfiguration for joy
  • Loading branch information
stonier authored Oct 19, 2016
2 parents 92f30ac + 92be4c8 commit 66fdf2d
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 2.8.3)
project(yocs_msgs)

find_package(catkin REQUIRED COMPONENTS actionlib_msgs std_msgs geometry_msgs std_srvs message_generation)
find_package(catkin REQUIRED COMPONENTS dynamic_reconfigure actionlib_msgs std_msgs geometry_msgs std_srvs message_generation)

add_message_files(FILES ARPair.msg
ARPairList.msg
Expand Down Expand Up @@ -29,6 +29,10 @@ add_action_files(
Localize.action
)

generate_dynamic_reconfigure_options( dynamic_reconfigure/Joystick.cfg )

generate_messages(DEPENDENCIES actionlib_msgs std_msgs geometry_msgs std_srvs)

catkin_package(CATKIN_DEPENDS actionlib_msgs std_msgs geometry_msgs std_srvs message_runtime)
catkin_package(CATKIN_DEPENDS dynamic_reconfigure actionlib_msgs std_msgs geometry_msgs std_srvs message_runtime)

# install(DIRECTORY dynamic_reconfigure DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
12 changes: 12 additions & 0 deletions dynamic_reconfigure/Joystick.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env python

PACKAGE = "yocs_msgs"

from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()
gen.add("linear_scale", double_t, 0, "Linear Scale Input", 0.4, 0.0, 1.0)
gen.add("angular_scale", double_t, 0, "Angular Scale Input", 0.3, 0.0, 1.5 )

exit(gen.generate(PACKAGE, "yocs_msgs", "Joystick"))

2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
<build_depend>std_srvs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>dynamic_reconfigure</build_depend>

<run_depend>actionlib_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>std_srvs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>dynamic_reconfigure</run_depend>
</package>

0 comments on commit 66fdf2d

Please sign in to comment.