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

Conversation

tkmtnt7000
Copy link
Member

Almost same as #1634. Reflect #1588 .

In this PR, an email config file is auto-generated when we build workspace.
(robot_name)_email_topic.yaml is loaded when robot starts.

jsk_pr2_robot/jsk_pr2_startup/CMakeLists.txt Outdated Show resolved Hide resolved
jsk_fetch_robot/jsk_fetch_startup/CMakeLists.txt Outdated Show resolved Hide resolved
# Create email config for PR2
macro(configure_email_topic_yaml rname)
cmake_host_system_information(RESULT PR2_NAME QUERY HOSTNAME)
if (${PR2_NAME} MATCHES ^${rname})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (${PR2_NAME} MATCHES ^${rname})
if (${PR2_NAME} STREQUAL "pr1012" OR ${PR2_NAME} STREQUAL "pr1040")

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

btw, do we need to check if the machine's hostname?
we can compile yaml file in any machine, I think.

Copy link
Member Author

@tkmtnt7000 tkmtnt7000 Oct 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started to think we do not have to check hostname.
Update in b012e94 43be78a

@tkmtnt7000 tkmtnt7000 changed the title [jsk_fetch_startup] Generate fetch_email_topic.yaml when building wor… [Fetch] [PR2] Generate fetch_email_topic.yaml when building workspace Oct 5, 2022
@tkmtnt7000 tkmtnt7000 changed the title [Fetch] [PR2] Generate fetch_email_topic.yaml when building workspace [Fetch] [PR2] [Baxter] [Unitree] Generate fetch_email_topic.yaml when building workspace Oct 5, 2022
@tkmtnt7000 tkmtnt7000 changed the title [Fetch] [PR2] [Baxter] [Unitree] Generate fetch_email_topic.yaml when building workspace [Fetch] [PR2] [Baxter] [Unitree] Generate (robot)_email_topic.yaml when building workspace Oct 5, 2022
@tkmtnt7000 tkmtnt7000 force-pushed the PR-use-generated-yaml-for-smachnotifier branch from f5372be to 8955b99 Compare October 5, 2022 11:11
@tkmtnt7000 tkmtnt7000 added the hacktoberfest-accepted https://hacktoberfest.digitalocean.com/hacktoberfest-update label Oct 6, 2022
@k-okada
Copy link
Member

k-okada commented Oct 6, 2022

https://github.com/jsk-ros-pkg/jsk_robot/pull/1646/files#diff-2d20033b5d7cadf9aef4bae5433328477862903543682887dc7ebdd535e20dddR67-R68
lines say if we have 2 robot, we need 2 lines of code, and if we have another robot, then we need 3 lines of code.
if
#1634 (comment)
support any number of robots, then we chould choose this strategy.

@knorth55
Copy link
Member

as I said in #1634 (comment) and k-okada@37b71ce#r87121340,
receiver mail address should be different.

So we need to add a new argument like robot_name to controlle the receiver address.

  <node name="server_name" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen">
    <param name="sender_address" command='bash -c "echo `hostname`@jsk.imi.i.u-tokyo.ac.jp"' />
    <param name="receiver_address" value="$(arg robot_name)@jsk.imi.i.u-tokyo.ac.jp" />
  </node>

@k-okada
Copy link
Member

k-okada commented Oct 19, 2022

how about

  <node name="server_name" pkg="jsk_robot_startup" type="smach_to_mail.py" output="screen">
    <param name="sender_address" command='bash -c "echo `hostname`@jsk.imi.i.u-tokyo.ac.jp"' />
    <param name="receiver_address" command='python -c "import rospy;print(rospy.get_param(\"robot/type\")+\"@jsk.imi.i.u-tokyo.ac.jp\")"' />
  </node>

@knorth55
Copy link
Member

hmmm... it looks pretty complicated, but it may work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants