This commit is contained in:
Your Name 2025-01-17 13:30:02 +01:00
parent 60c5713b13
commit 8c45ae38e6
3 changed files with 63 additions and 19 deletions

View File

@ -95,6 +95,11 @@ install(FILES README.md LICENSE.md
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
) )
# Install configuration files
install(DIRECTORY config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
FILES_MATCHING PATTERN "*.yaml"
)
################################################################################ ################################################################################
# Test # Test
################################################################################ ################################################################################

View File

@ -1,19 +1,28 @@
twist_mux: # Input topics handled/muxed.
ros__parameters: # For each topic:
topics: # - name : name identifier to select the topic
# common: # - topic : input topic of geometry_msgs::Twist type
# topic : cmd_vel_common # - timeout : timeout in seconds to start discarding old messages, and use 0.0 speed instead
# timeout : 0.5 # - priority: priority in the range [0, 255]; the higher the more priority over other topics
# priority: 0
navigation: topics:
topic : cmd_vel -
timeout : 0.5 name : navigation
priority: 10 topic : nav_vel
# tracker: timeout : 0.5
# topic : cmd_vel_tracker priority: 100
# timeout : 0.5 -
# priority: 20 name : joystick
joystick: topic : joy_vel
topic : cmd_vel_joy timeout : 0.5
timeout : 0.5 priority: 90
priority: 50 -
name : keyboard
topic : key_vel
timeout : 0.5
priority: 90
-
name : tablet
topic : tab_vel
timeout : 0.5
priority: 90

30
launch/twist_mux.launch Normal file
View File

@ -0,0 +1,30 @@
<launch>
<arg name="joy_vel_in" default="input_joy/cmd_vel"/>
<arg name="joy_vel_out" default="joy_vel"/>
<arg name="cmd_vel_out" default="twist_mux/cmd_vel"/>
<arg name="config_locks" default="$(find twist_mux)/config/twist_mux_locks.yaml"/>
<arg name="config_topics" default="$(find cps_rmp220_Support)/config/twist_mux_topics.yaml"/>
<arg name="config_joy" default="$(find twist_mux)/config/joystick.yaml"/>
<node pkg="twist_mux" type="twist_mux" name="twist_mux" output="screen">
<remap from="cmd_vel_out" to="$(arg cmd_vel_out)"/>
<rosparam file="$(arg config_locks)" command="load"/>
<rosparam file="$(arg config_topics)" command="load"/>
</node>
<node pkg="twist_mux" type="twist_marker" name="twist_marker">
<remap from="twist" to="$(arg cmd_vel_out)"/>
<remap from="marker" to="twist_marker"/>
</node>
<node pkg="twist_mux" type="joystick_relay.py" name="joystick_relay" output="screen">
<remap from="joy_vel_in" to="$(arg joy_vel_in)"/>
<remap from="joy_vel_out" to="$(arg joy_vel_out)"/>
<rosparam file="$(arg config_joy)" command="load"/>
</node>
</launch>