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

[Fetch] [PR2] [Baxter] [Unitree] Generate (robot)_email_topic.yaml when building workspace #1646

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
4ceab94
[jsk_fetch_startup] Generate fetch_email_topic.yaml when building wor…
tkmtnt7000 Oct 4, 2022
029b0fd
[jsk_fetch_startup/config] Ignore email config from git tracking
tkmtnt7000 Oct 4, 2022
a268672
[jsk_fetch_startup] Load rosparam for smach_to_mail as yaml
tkmtnt7000 Oct 2, 2022
3a6ef10
[jsk_pr2_startup] Generate pr2_email_topic.yaml when building workspace
tkmtnt7000 Oct 5, 2022
2b9cddb
[jsk_pr2_startup] Run email_topic.py and smach_to_mail.py by default
tkmtnt7000 Aug 26, 2022
3d86b82
[jsk_pr2_startup] Update node name of smach_to_mail to clarify
tkmtnt7000 Aug 31, 2022
035bb49
[jsk_pr2_startup] Load rosparam for smach_to_mail as yaml
tkmtnt7000 Oct 5, 2022
d0d4ff6
[jsk_pr2_startup] Ignore email config from git tracking
tkmtnt7000 Oct 5, 2022
f704090
[jsk_fetch_startup] Add comment for generating email config
tkmtnt7000 Oct 5, 2022
934cdab
[jsk_pr2_startup] Not check hostname to generate email config
tkmtnt7000 Oct 5, 2022
730cab2
[jsk_fetch_startup] Not check hostname to generate email config
tkmtnt7000 Oct 5, 2022
4361a29
[jsk_baxter_startup] Ignore email config file
tkmtnt7000 Oct 5, 2022
78c5eb3
[jsk_unitree_startup] Ignore email config file
tkmtnt7000 Oct 5, 2022
a3bf844
[jsk_baxter_startup] Generate email config file when building workspace
tkmtnt7000 Oct 5, 2022
910b61d
[jsk_unitree_startup] Generate email config file when building workspace
tkmtnt7000 Oct 5, 2022
d07b056
[jsk_baxter_startup] Launch email node and smach notification by default
tkmtnt7000 Oct 5, 2022
65d5211
Delete email_topic.yaml.in from each robot package
tkmtnt7000 Oct 5, 2022
8955b99
[jsk_robot_startup] Add base email config file
tkmtnt7000 Oct 5, 2022
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
1 change: 1 addition & 0 deletions jsk_baxter_robot/jsk_baxter_startup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*_email_topic.yaml
11 changes: 11 additions & 0 deletions jsk_baxter_robot/jsk_baxter_startup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,14 @@ install(DIRECTORY config jsk_baxter_joy jsk_baxter_lifelog jsk_baxter_moveit jsk

install(FILES baxter.launch DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

# Create email config for baxter
macro(configure_email_topic_yaml rname baxter_name)
set(BAXTER_NAME ${baxter_name})
set(RECEIVER_MAIL ${rname})
set(EMAIL_SENDER_ADDRESS ${BAXTER_NAME}@jsk.imi.i.u-tokyo.ac.jp)
set(EMAIL_RECEIVER_ADDRESS ${RECEIVER_MAIL}@jsk.imi.i.u-tokyo.ac.jp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../jsk_robot_common/jsk_robot_startup/config/email_topic.yaml.in
${CMAKE_CURRENT_SOURCE_DIR}/config/${BAXTER_NAME}_email_topic.yaml)
endmacro(configure_email_topic_yaml)

configure_email_topic_yaml(baxter baxter)
13 changes: 13 additions & 0 deletions jsk_baxter_robot/jsk_baxter_startup/baxter.launch
Original file line number Diff line number Diff line change
Expand Up @@ -233,4 +233,17 @@
<node name="$(anon rviz)" pkg="rviz" type="rviz" if="$(arg launch_rviz)"
args="-d $(find jsk_baxter_startup)/config/baxter_default.rviz"/>

<!-- send email by rostopic -->
<node name="email_topic" pkg="jsk_robot_startup" type="email_topic.py" output="screen">
<rosparam>
email_info: $(find jsk_baxter_startup)/config/baxter_email_topic.yaml
</rosparam>
</node>

<!-- send email, twitter with smach -->
<node name="smach_to_mail_server" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen">
<rosparam command="load"
file="$(find jsk_baxter_startup)/config/baxter_email_topic.yaml" />
</node>

</launch>
14 changes: 13 additions & 1 deletion jsk_fetch_robot/jsk_fetch_startup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,21 @@ macro(configure_icon_files icol iname)
endif()
endmacro(configure_icon_files)

# Create email config for fetch
macro(configure_email_topic_yaml rname fetch_name)
# If HOSTNAME is "fetchxxx", create email config
set(FETCH_NAME ${fetch_name})
set(RECEIVER_MAIL ${rname})
set(EMAIL_SENDER_ADDRESS ${FETCH_NAME}@jsk.imi.i.u-tokyo.ac.jp)
set(EMAIL_RECEIVER_ADDRESS ${RECEIVER_MAIL}@jsk.imi.i.u-tokyo.ac.jp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../jsk_robot_common/jsk_robot_startup/config/email_topic.yaml.in
${CMAKE_CURRENT_SOURCE_DIR}/config/${FETCH_NAME}_email_topic.yaml)
endmacro(configure_email_topic_yaml)

configure_icon_files(blue fetch15)
configure_icon_files(red fetch1075)

configure_email_topic_yaml(fetch fetch15)
configure_email_topic_yaml(fetch fetch1075)

#############
## Testing ##
Expand Down
1 change: 1 addition & 0 deletions jsk_fetch_robot/jsk_fetch_startup/config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fetch*_email_topic.yaml
5 changes: 2 additions & 3 deletions jsk_fetch_robot/jsk_fetch_startup/launch/fetch_bringup.launch
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,8 @@

<!-- send email, twitter with smach -->
<node name="server_name" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen">
<rosparam>
email_info: /var/lib/robot/email_topic.yaml
</rosparam>
<rosparam command="load"
file="$(find jsk_fetch_startup)/config/$(arg hostname)_email_topic.yaml" />
</node>

<!-- Two robots cannot use one rosserial device at the same time -->
Expand Down
1 change: 1 addition & 0 deletions jsk_pr2_robot/jsk_pr2_startup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pr*_email_topic.yaml
13 changes: 13 additions & 0 deletions jsk_pr2_robot/jsk_pr2_startup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,16 @@ endforeach()

install(FILES install_pr1040_description.sh jsk_pr2.machine plugin.xml startup.app
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

# Create email config for PR2
macro(configure_email_topic_yaml rname pr2_name)
set(PR2_NAME ${pr2_name})
set(RECEIVER_MAIL ${rname})
set(EMAIL_SENDER_ADDRESS ${PR2_NAME}@jsk.imi.i.u-tokyo.ac.jp)
set(EMAIL_RECEIVER_ADDRESS ${RECEIVER_MAIL}@jsk.imi.i.u-tokyo.ac.jp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../jsk_robot_common/jsk_robot_startup/config/email_topic.yaml.in
${CMAKE_CURRENT_SOURCE_DIR}/config/${PR2_NAME}_email_topic.yaml)
endmacro(configure_email_topic_yaml)

configure_email_topic_yaml(pr2 pr1012)
configure_email_topic_yaml(pr2 pr1040)
14 changes: 14 additions & 0 deletions jsk_pr2_robot/jsk_pr2_startup/pr2.launch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<launch>
<node pkg="jsk_robot_startup" type="start_launch_sound.py"
name="start_launch_sound" />
<arg name="hostname" default="pr1040" />
<arg name="map_frame" default="eng2" />
<arg name="launch_map" default="true" />
<arg name="launch_kinect" default="true" />
Expand Down Expand Up @@ -195,4 +196,17 @@
<remap from="~input" to="/kinect_head/rgb/image_raw" />
</node>

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

<!-- send email, twitter with smach -->
<node name="smach_to_mail_server" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen">
<rosparam command="load"
file="$(find jsk_pr2_startup)/config/$(arg hostname)_email_topic.yaml" />
</node>

</launch>
2 changes: 2 additions & 0 deletions jsk_robot_common/jsk_robot_startup/config/email_topic.yaml.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
sender_address: @EMAIL_SENDER_ADDRESS@
receiver_address: @EMAIL_RECEIVER_ADDRESS@
1 change: 1 addition & 0 deletions jsk_unitree_robot/jsk_unitree_startup/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*_email_topic.yaml
11 changes: 11 additions & 0 deletions jsk_unitree_robot/jsk_unitree_startup/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@ install(DIRECTORY config launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
USE_SOURCE_PERMISSIONS)

macro(configure_email_topic_yaml rname unitree_name)
set(UNITREE_NAME ${unitree_name})
set(RECEIVER_MAIL ${rname})
set(EMAIL_SENDER_ADDRESS ${UNITREE_NAME}@jsk.imi.i.u-tokyo.ac.jp)
set(EMAIL_RECEIVER_ADDRESS ${RECEIVER_MAIL}@jsk.imi.i.u-tokyo.ac.jp)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../jsk_robot_common/jsk_robot_startup/config/email_topic.yaml.in
${CMAKE_CURRENT_SOURCE_DIR}/config/${UNITREE_NAME}_email_topic.yaml)
endmacro(configure_email_topic_yaml)

configure_email_topic_yaml(unitree unitreepro)

#############
## Testing ##
#############
Expand Down