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

[jsk_fetch_startup] use odom_combined topic in fetch_nav and fetch_teleop #1363

Merged
merged 4 commits into from
Jul 18, 2021
Merged
Changes from 3 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
48 changes: 2 additions & 46 deletions jsk_fetch_robot/jsk_fetch_startup/launch/fetch_teleop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
joystick_teleop need to publish /teleop/cmd_vel/unsafe ,
see https://github.com/jsk-ros-pkg/jsk_robot/blob/master/jsk_fetch_robot/jsk_fetch_startup/README.md -->
<node name="teleop" pkg="fetch_teleop" type="joystick_teleop" respawn="true">
<remap from="teleop/cmd_vel" to="/teleop/cmd_vel/unsafe" />
<remap from="teleop/cmd_vel" to="/joy_vel" />
<remap from="/odom" to="$(arg odom_topic)" />
<param name="arm/button_arm_linear" value="4"/>
<param name="arm/button_arm_angular" value="6"/>
Expand All @@ -49,7 +49,7 @@
<!-- Relay topic names according to system diagram -->
<node name="relay_odom"
pkg="topic_tools" type="relay"
args="/odom_combined /odom_teleop" />
args="$(arg odom_topic) /odom_teleop" />
<node name="relay_navigation_cmd_vel"
pkg="topic_tools" type="relay"
args="/cmd_vel /navigation/cmd_vel" />
Expand Down Expand Up @@ -84,50 +84,6 @@
<param name="tuck_button" value="5"/>
</node>

<!-- safe teleop -->
<node name="unsafe_vel_mux" pkg="topic_tools" type="mux" respawn="true"
args="/teleop/cmd_vel /teleop/cmd_vel/safe /teleop/cmd_vel/unsafe">
<remap from="mux" to="unsafe_vel_mux" />
</node>

<!-- m.button[10]: L1 -->
<!-- m.button[9] : R2 -->
<!-- safe teleop with L1 -->
<node name="cmd_vel_mux_selector" pkg="jsk_robot_startup" type="mux_selector.py"
respawn="true"
args="/joy 'm.buttons[10]==1' /teleop/cmd_vel /cmd_vel 'True' /cmd_vel">
<remap from="mux" to="cmd_vel_mux" />
<param name="default_select" value="/cmd_vel" />
</node>

<!-- unsafe teleop with L1 and R2 -->
<node name="unsafe_vel_mux_selector" pkg="jsk_robot_startup" type="mux_selector.py"
respawn="true"
args="/joy 'm.buttons[10]==1 and m.buttons[9]==1' /teleop/cmd_vel/unsafe /joy 'm.buttons[10]==1 and m.buttons[9]==0' /teleop/cmd_vel/safe">
<remap from="mux" to="unsafe_vel_mux" />
<param name="default_select" value="/teleop/cmd_vel/safe" />
</node>

<node name="safe_teleop_base" pkg="safe_teleop_base" type="safe_teleop_base">
<remap from="base_velocity" to="/teleop/cmd_vel/unsafe" />
<remap from="~safe_vel" to="/teleop/cmd_vel/safe" />
<remap from="/odom" to="$(arg odom_topic)" />
<rosparam file="$(find fetch_navigation)/config/costmap_common.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find fetch_navigation)/config/fetch/costmap_common.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find fetch_navigation)/config/costmap_local.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find fetch_navigation)/config/fetch/costmap_local.yaml" command="load" ns="local_costmap" />
</node>
<rosparam ns="safe_teleop_base/local_costmap">
inflater:
inflation_radius: 1.0 # 0.7
cost_scaling_factor: 3.0 # 25.0 default 10, increasing factor decrease the cost value
obstacles:
min_obstacle_height: 0.05
# default 5 (http://wiki.ros.org/navigation/Tutorials/Navigation%20Tuning%20Guide)
update_frequency: 10.0
footprint_padding: 0.05
</rosparam>

<node name="safe_tilt_head" pkg="jsk_fetch_startup" type="safe_tilt_head.py" />

<!-- audible warning on unsafe teleop -->
Expand Down