Questions regarding messaging between nodes

Some questions regarding message exchange that I couldn’t find the answer for in the doc :

  • How can I make a node wait for a message?
  • Can I start sending messages in start() function and expect a node to answer, or can that only be done in tick() function?
  • Is there something similar to ROS services in Isaac?
  • What is the proper way to stop a node within code (like ros::shutdown() function) ?
  • EDIT : Is it possible to modify an Isaac parameter from code?

I’m sorry if my questions are simple or have already been answered, I’m a beginner.

To your first question, you can call tickOnMessage(rx_some_message()) instead of tickPeriodically().

Thank you for you answer, but what if I want to wait for a message inside a tick? What if I need to wait for multiple messages?

  • what if I want to wait for a message inside a tick?
    if you use tickOnMessage(rx_x()), when x is already available in the tick. You can check another rx_y message is available in the tick with if (rx_y().available())

  • What if I need to wait for multiple messages??
    You can use tickOnMessage(rx_x()); tickOneMessage(rx_y()) on multiple message channels, then use available() to check if all are available. you can also use synchronize(rx_x(), rx_y()) to only get synchronized message (identical acqtime)

  • Can I start sending messages in start() function and expect a node to answer, or can that only be done in tick() function?
    you can publish a message in the start function, however you can’t receive a message while in start/tick function, only in between ticks

  • Is there something similar to ROS services in Isaac?
    no. if you need to match reply to request, you can use the message uuid (set it in the server to the request’s message uuid)

  • What is the proper way to stop a node within code (like ros::shutdown() function) ?
    reportSuccess/reportFailure from a codelet

  • Is it possible to modify an Isaac parameter from code?
    yes use set_param name. for ISAAC_PARAM(string, foo), you can use set_foo(“xxx”)

Alright, thank you for your help.