Skip to content

Commit

Permalink
[jsk_robot_startup/quadruped_joystick_teleop] add publish_cmd_vel_fro…
Browse files Browse the repository at this point in the history
…m_quadruped_joystick_teleop option to quadruped_joystick_teleop.launch. publish cmd_vel from publish_cmd_vel_from_quadruped_joystick_teleop at the specified rate, instead of teleop_node/teleop_twist_joy, which publish cmd_vel based at the rate of joy topic
  • Loading branch information
k-okada committed Dec 12, 2024
1 parent c9a7511 commit 0ef17fc
Showing 1 changed file with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
<arg name="tuck_service" default="tuck" />
<arg name="untuck_service" default="untuck" />

<arg name="publish_cmd_vel_from_quadruped_joystick_teleop" default="false" />

<group if="$(arg launch_joy_node)" >
<node
pkg="joy"
Expand All @@ -30,19 +32,28 @@
</node>
</group>

<node
pkg="teleop_twist_joy"
type="teleop_node"
name="teleop_twist_joy_$(arg pad_type)"
>
<remap from="joy" to="$(arg joy_topic)" />
<remap from="cmd_vel" to="$(arg cmd_vel_topic)" />
<group unless="$(arg publish_cmd_vel_from_quadruped_joystick_teleop)" >
<node
pkg="teleop_twist_joy"
type="teleop_node"
name="teleop_twist_joy_$(arg pad_type)"
>
<remap from="joy" to="$(arg joy_topic)" />
<remap from="cmd_vel" to="$(arg cmd_vel_topic)" />

<rosparam
command="load"
file="$(arg teleop_twist_joy_param_file)"
/>
</node>
</group>
<group ns="$(arg joy_name_space)/joystick_teleop_$(arg pad_type)"
if="$(arg publish_cmd_vel_from_quadruped_joystick_teleop)" >
<rosparam
command="load"
file="$(arg teleop_twist_joy_param_file)"
/>
</node>
</group>

<node
pkg="jsk_robot_startup"
Expand All @@ -60,5 +71,11 @@
command="load"
file="$(arg joystick_teleop_param_file)"
/>

<!-- setting for publish_cmd_vel_from_quadruped_joystick_teleop -->
<rosparam subst_value="true">
publish_cmd_vel: $(arg publish_cmd_vel_from_quadruped_joystick_teleop)
</rosparam>
<remap from="cmd_vel" to="/$(arg cmd_vel_topic)" />
</node>
</launch>

0 comments on commit 0ef17fc

Please sign in to comment.