ami-iit / yarp-openmct

Repo for YARP and OpenMCT integration.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Run iCub telemetry server and openMCT visualizer in one line command: Iteration 1/2 #27

Closed nunoguedelha closed 3 years ago

nunoguedelha commented 3 years ago

Implements #25 . (iteration 1/2)

traversaro commented 3 years ago

Could it make sense to document its use somewhere? Furthermore, if we want to stop the program launched with this script, what would be the best way?

nunoguedelha commented 3 years ago

I was planning to add all the missing updates and the how to of this script in #22 , but indeed it's better to do it right away here. With the current implementation, after the servers are launched by this script, we can stop them with a single command pkill -3 node. This is acceptable if these servers are the only running Node.js applications.

Another way would be to run from the terminal only the iCubTelemetryServer, and then have the server itself run the openmctStaticServer as child process using the spawn command. Actually this should be a better solution since installing and running the openmctStaticServer server separately was only due to the difference in the Node.js versions.

nunoguedelha commented 3 years ago

I'll push the changes here.

nunoguedelha commented 3 years ago

Further analysis ongoing ... (https://github.com/ami-iit/yarp-openmct/issues/25#issuecomment-914900844)

nunoguedelha commented 3 years ago

A class OpenMctServerHandler object has been created for handling the child process meant to run the openMCT visualizer. For now:

@traversaro , although it is not the best way to proceed in general, I would like to freeze the work of this PR as is, merge it, and implement the 2nd iteration (2/2: ) in a new PR on top of al the others. This would simplify the merge of the remaining PRs #20 and #30 . Do you agree?

traversaro commented 3 years ago

@traversaro , although it is not the best way to proceed in general, I would like to freeze the work of this PR as is, merge it, and implement the 2nd iteration (2/2: ) in a new PR on top of al the others. This would simplify the merge of the remaining PRs #20 and #30 . Do you agree?

Ok!

nunoguedelha commented 3 years ago

Second iteration implemented in #32 .