Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Clean way to talk to external application (C# To ROS C++ node)?

Discussion in 'Linux' started by Hidden_Markov, Jul 29, 2016.

  1. Hidden_Markov

    Hidden_Markov

    Joined:
    Jan 27, 2015
    Posts:
    2
    Hello everyone,

    I'm trying to think of a clean way to get a C# script to talk with an external C++ application, (a ROS node). ROS nodes can be launched like any other executable, and I was thinking that maybe I could start the ros node from the C# script and redirect the standard output/input. Ideally I would like Unity to be able to send some data to the ROS node, have it do some ROS stuff, and then have the ROS node send data back to Unity. This is primarily to visualize and interact with some robotics stuff.

    Problem with my idea is I don't know where to start. Does anyone have any ideas or alternative suggestions? (Or maybe someone has done something similar and could post an example?)

    I am doing this on Linux Unity (as ROS is linux only), so I wasn't sure if the general C# scripting forum was more appropriate or not.

    Thank you!
     
  2. bfloch

    bfloch

    Joined:
    Jan 4, 2013
    Posts:
    24
  3. Tak

    Tak

    Unity Technologies

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    You can also use System.Diagnostics.Process to launch/interact with external processes.
    (This is probably a good topic for the scripting forum.)