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

[gazebo] Resupport gazebo environment Fetch and PR2 #1912

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
18 changes: 18 additions & 0 deletions jsk_fetch_robot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,19 @@ or
Gazebo can be used for simulating robot's movements.
It is unable to communicate to the real robot when running the simulation.

#### Create the environment

``` bash
cd catkin_ws/src
vcs import < jsk-ros-pkg/jsk_robot/jsk_fetch_robot/jsk_fetch_gazebo.noetic.repos
rosdep install -y -r --from-paths . --ignore-src
cd ../
catkin build
source devel/setup.bash
```

#### How to run

```bash
roslaunch fetch_gazebo simulation.launch
roslaunch fetch_moveit_config move_group.launch
Expand All @@ -106,6 +119,11 @@ Roseus script can be executed on Gazebo. The whole demo is in `jsk_fetch_gazebo_
roslaunch jsk_fetch_gazebo_demo demo.launch
```

If you want to spawn 73B2 model
```bash
roslaunch jsk_fetch_startup fetch_gazebo_73b2.launch
```

## Fetcheus APIs

### Common
Expand Down
9 changes: 9 additions & 0 deletions jsk_fetch_robot/jsk_fetch_gazebo.noetic.repos
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
repositories:
ZebraDevs/fetch_gazebo:
type: git
url: [email protected]:ZebraDevs/fetch_gazebo
version: gazebo11
GT-RAIL/robot_pose_publisher:
type: git
url: [email protected]:GT-RAIL/robot_pose_publisher
version: develop
41 changes: 27 additions & 14 deletions jsk_fetch_robot/jsk_fetch_startup/launch/fetch_bringup.launch
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,19 @@
<arg name="use_build_map" default="false" />
<arg name="use_keepout" default="true" />
<arg name="fetch_switchbot" default="true" />
<arg name="launch_fetch_lifelog" default="true" />
<arg name="use_diagnostic_aggregator" default="true" />
<arg name="use_cpu_monitor" default="true" />
<arg name="launch_twitter" default="true" />
<arg name="launch_app_manager" default="true" />
<arg name="use_network_status" default="true" />
<arg name="use_network_detector" default="true" />
<arg name="use_respeaker" default="true" />
<arg name="check_room_light" default="true" />
<arg name="check_driver_boards" default="true" />
<arg name="use_email" default="true" />
<arg name="use_serial" default="true" />


<param name="robot/type" value="fetch" />
<param name="robot/name" command='bash -c "hostname | xargs echo -n"' />
Expand Down Expand Up @@ -73,20 +86,20 @@
</node>

<!-- logging -->
<include file="$(find jsk_fetch_startup)/launch/fetch_lifelog.xml">
<include file="$(find jsk_fetch_startup)/launch/fetch_lifelog.xml" if="$(arg launch_fetch_lifelog)">
<arg name="map_frame" value="$(arg map_frame)" />
<arg name="vital_check" value="false" />
</include>

<!-- diagnostic aggregator -->
<node pkg="diagnostic_aggregator" type="aggregator_node"
name="diag_agg" args="CPP" output="screen" >
name="diag_agg" args="CPP" output="screen" if="$(arg use_diagnostic_aggregator)">
<rosparam command="load" file="$(find jsk_fetch_startup)/config/fetch_analyzers.yaml" />
</node>

<!-- publish CPU status to diagnostics -->
<node name="cpu_monitor" pkg="pr2_computer_monitor" type="cpu_monitor.py"
args="--diag-hostname=my_machine" >
args="--diag-hostname=my_machine" if="$(arg use_cpu_monitor)">
<param name="check_ipmi_tool" value="false" type="bool" />
<param name="enforce_clock_speed" value="false" type="bool" />
<param name="num_cores" value="-1" type="int" />
Expand All @@ -95,15 +108,15 @@
</node>

<!-- twitter -->
<include file="$(find jsk_fetch_startup)/launch/fetch_tweet.launch" />
<include file="$(find jsk_fetch_startup)/launch/fetch_tweet.launch" if="$(arg launch_twitter)"/>

<!-- switchbot -->
<include file="$(find switchbot_ros)/launch/switchbot.launch" if="$(arg fetch_switchbot)">
<arg name="token" value="/var/lib/robot/switchbot_token.txt" />
</include>

<!-- app manager -->
<include file="$(find jsk_robot_startup)/lifelog/app_manager.launch">
<include file="$(find jsk_robot_startup)/lifelog/app_manager.launch" if="$(arg launch_app_manager)">
<arg name="use_applist" value="false" /> <!-- use plugin -->
<arg name="respawn" value="false" />
<arg name="basic" value="true" />
Expand All @@ -122,25 +135,25 @@
</include>

<!-- network status -->
<node pkg="jsk_network_tools" type="network_status.py" name="network_status" />
<node pkg="jsk_network_tools" type="network_status.py" name="network_status" if="$(arg use_network_status)"/>
<!-- network detector -->
<node pkg="pr2_computer_monitor" type="network_detector" name="network_detector">
<node pkg="pr2_computer_monitor" type="network_detector" name="network_detector" if="$(arg use_network_detector)">
<rosparam>
interface_name: wlan0
</rosparam>
</node>

<!-- speech recognition -->
<node name="respeaker_transformer" pkg="tf" type="static_transform_publisher"
args="0 0 0.1 0 0 0 head_pan_link respeaker_base 100"/>
args="0 0 0.1 0 0 0 head_pan_link respeaker_base 100" if="$(arg use_respeaker)"/>
<!-- disable sound_play in julius.launch and place it in fetch_bringup.launch -->
<!-- see: https://github.com/jsk-ros-pkg/jsk_robot/pull/1140 -->
<include file="$(find julius_ros)/launch/julius.launch">
<arg name="launch_audio_capture" value="false"/>
<arg name="launch_sound_play" value="false"/>
<arg name="speech_to_text_topic" value="speech_to_text_julius"/>
</include>
<include file="$(find respeaker_ros)/launch/sample_respeaker.launch">
<include file="$(find respeaker_ros)/launch/sample_respeaker.launch" if="$(arg use_respeaker)">
<arg name="publish_tf" default="false"/>
<arg name="launch_soundplay" default="false"/>
<arg name="audio" value="speech_audio"/>
Expand Down Expand Up @@ -232,7 +245,7 @@
</node>

<!-- check if room light is on -->
<node name="check_room_light" pkg="jsk_robot_startup" type="check_room_light.py">
<node name="check_room_light" pkg="jsk_robot_startup" type="check_room_light.py" if="$(arg check_room_light)">
<remap from="~input" to="/head_camera/rgb/image_raw" />
</node>

Expand All @@ -245,26 +258,26 @@
</node>

<!-- Check fetch's boards in a constant period -->
<node name="check_board_info" pkg="jsk_fetch_diagnosis" type="check_driver_boards.py" output="screen">
<node name="check_board_info" pkg="jsk_fetch_diagnosis" type="check_driver_boards.py" output="screen" if="$(arg check_driver_boards)">
</node>

<!-- send email by rostopic -->
<node name="email_topic" pkg="jsk_robot_startup" type="email_topic.py" output="screen">
<node name="email_topic" pkg="jsk_robot_startup" type="email_topic.py" output="screen" if="$(arg use_email)">
<rosparam>
email_info: /var/lib/robot/email_topic.yaml
</rosparam>
</node>

<!-- send email, twitter with smach -->
<node name="server_name" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen">
<node name="server_name" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen" if="$(arg use_email)">
<rosparam>
email_info: /var/lib/robot/email_topic.yaml
</rosparam>
</node>

<!-- Two robots cannot use one rosserial device at the same time -->
<group if="$(eval hostname == 'fetch1075')">
<include file="$(find jsk_fetch_startup)/launch/fetch_rosserial.launch" />
<include file="$(find jsk_fetch_startup)/launch/fetch_rosserial.launch" if="$(arg use_serial)"/>
</group>

<!-- Publish /diagnostics based on topics and nodes sanity check -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,18 @@
<arg name="launch_teleop" value="false" /> <!-- duplicates cmd_vel_mux nodes -->
<arg name="launch_insta360" value="false" />
<arg name="fetch_switchbot" value="false" />
<arg name="launch_fetch_lifelog" default="false" />
<arg name="use_diagnostic_aggregator" default="false" />
<arg name="use_cpu_monitor" default="false" />
<arg name="launch_twitter" default="false" />
<arg name="launch_app_manager" default="false" />
<arg name="use_network_status" default="false" />
<arg name="use_network_detector" default="false" />
<arg name="use_respeaker" default="false" />
<arg name="check_room_light" default="false" />
<arg name="check_driver_boards" default="false" />
<arg name="use_email" default="false" />
<arg name="use_serial" default="false" />
<arg name="use_voice_text" default="false" />
</include>
</launch>
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<arg name="INITIAL_POSE_Y" default="0.0" />
<arg name="INITIAL_POSE_Z" default="0.0" />
<arg name="INITIAL_POSE_YAW" default="0.0" />
<arg name="launch_move_base" default="false" />

<include file="$(find jsk_fetch_startup)/launch/fetch_gazebo_bringup.launch">
<arg name="world" value="$(find eusurdf)/worlds/room73b2.world" />
Expand All @@ -11,6 +12,7 @@
<arg name="INITIAL_POSE_Y" value="$(arg INITIAL_POSE_Y)" />
<arg name="INITIAL_POSE_Z" value="$(arg INITIAL_POSE_Z)" />
<arg name="INITIAL_POSE_YAW" value="$(arg INITIAL_POSE_YAW)" />
<arg name="launch_move_base" default="$(arg launch_move_base)" />
</include>

<node name="initial_pose_publisher" output="screen"
Expand Down
Loading