-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1519 from 708yamaguchi/add-m5stack-rosserial-master
[jsk_fetch_startup] Add launch to use m5stack sensors via rosserial + bluetooth
- Loading branch information
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
jsk_fetch_robot/jsk_fetch_startup/launch/fetch_rosserial.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
<launch> | ||
<!-- The rfcomm device names (e.g. /dev/rfcomm0) corresponds to | ||
the order of /var/lib/robot/rfcomm_devices.yaml --> | ||
<!-- To bind rfcomm devices, https://github.com/jsk-ros-pkg/jsk_robot/pull/1401 is used --> | ||
|
||
<!-- The firmwares are https://github.com/jsk-ros-pkg/jsk_3rdparty/pull/289 --> | ||
<!-- Set logger leve to error to supress WARN when the device is not connected --> | ||
|
||
<arg name="sgp30_ns" value="sgp30" /> | ||
<arg name="pdm_spm1423_ns" value="pdm_spm1423" /> | ||
<arg name="mlx90640_ns" value="mlx90640" /> | ||
<arg name="unitv_ns" value="unitv" /> | ||
|
||
<!-- rosseiral via Bluetooth --> | ||
<!-- sgp30 gas sensor --> | ||
<group ns="$(arg sgp30_ns)"> | ||
<node pkg="rosserial_python" type="serial_node.py" name="serial_node" | ||
respawn="true" respawn_delay="10"> | ||
<rosparam subst_value="true"> | ||
port: /dev/rfcomm0 | ||
baud: 115200 | ||
</rosparam> | ||
</node> | ||
<node pkg="rosservice" type="rosservice" name="set_logger_level" | ||
args="call --wait /$(arg sgp30_ns)/serial_node/set_logger_level 'rosout' 'error'" /> | ||
</group> | ||
<!-- pdm_spm1423 microphone --> | ||
<group ns="$(arg pdm_spm1423_ns)"> | ||
<node pkg="rosserial_python" type="serial_node.py" name="serial_node" | ||
respawn="true" respawn_delay="10"> | ||
<rosparam subst_value="true"> | ||
port: /dev/rfcomm1 | ||
baud: 115200 | ||
</rosparam> | ||
</node> | ||
<node pkg="rosservice" type="rosservice" name="set_logger_level" | ||
args="call --wait /$(arg pdm_spm1423_ns)/serial_node/set_logger_level 'rosout' 'error'" /> | ||
</group> | ||
<!-- mlx90640 thermography --> | ||
<group ns="$(arg mlx90640_ns)"> | ||
<node pkg="rosserial_python" type="serial_node.py" name="serial_node" | ||
respawn="true" respawn_delay="10"> | ||
<rosparam subst_value="true"> | ||
port: /dev/rfcomm2 | ||
baud: 115200 | ||
</rosparam> | ||
</node> | ||
<node pkg="rosservice" type="rosservice" name="set_logger_level" | ||
args="call --wait /$(arg mlx90640_ns)/serial_node/set_logger_level 'rosout' 'error'" /> | ||
</group> | ||
<!-- unitv AI camera --> | ||
<group ns="$(arg unitv_ns)"> | ||
<node pkg="rosserial_python" type="serial_node.py" name="serial_node" | ||
respawn="true" respawn_delay="10"> | ||
<rosparam subst_value="true"> | ||
port: /dev/rfcomm3 | ||
baud: 115200 | ||
</rosparam> | ||
</node> | ||
<node pkg="rosservice" type="rosservice" name="set_logger_level" | ||
args="call --wait /$(arg unitv_ns)/serial_node/set_logger_level 'rosout' 'error'" /> | ||
<!-- decompress unitv image --> | ||
<node pkg="image_transport" type="republish" name="republish" args="compressed raw"> | ||
<remap from="in" to="unitv_image" /> | ||
<remap from="out" to="unitv_image" /> | ||
</node> | ||
<!-- draw recognized result on unitv image --> | ||
<node name="draw_rects" pkg="jsk_perception" type="draw_rects"> | ||
<remap from="~input" to="unitv_image" /> | ||
<remap from="~input/rects" to="unitv_image/rects" /> | ||
<remap from="~input/class" to="unitv_image/class" /> | ||
<rosparam> | ||
use_classification_result: true | ||
label_size: 0.3 | ||
resolution_factor: 2.0 | ||
</rosparam> | ||
</node> | ||
</group> | ||
</launch> |
12 changes: 12 additions & 0 deletions
12
jsk_fetch_robot/jsk_fetch_startup/supervisor_scripts/jsk-rfcomm-bind.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
[program:jsk-rfcomm-bind] | ||
command=/bin/bash -c ". /opt/ros/roscore_poststart.bash && . /home/fetch/ros/melodic/devel/setup.bash && roslaunch jsk_robot_startup rfcomm_bind.launch --wait" | ||
|
||
stopsignal=TERM | ||
directory=/home/fetch/ros/melodic | ||
autostart=true | ||
autorestart=false | ||
stdout_logfile=/var/log/ros/jsk-rfcomm-bind.log | ||
stderr_logfile=/var/log/ros/jsk-rfcomm-bind.log | ||
user=root | ||
environment=ROSCONSOLE_FORMAT="[${severity}] [${time}] [${node}:${logger}]: ${message}",PYTHONUNBUFFERED=1 | ||
priority=200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters