jupyter-ros icon indicating copy to clipboard operation
jupyter-ros copied to clipboard

rospy/jupyter-ros nodes - starting and stopping

Open pitosalas opened this issue 6 years ago • 2 comments

When I am writing or debugging a node in Jupyter Notebook + Jupyter Ros, I often need to run the edited version. I've been restarting the kernel in Jupyter as a way to try to get it to run the edited node, but I am not sure that works or is reliable. I've also tried killing roscore and restarting it. I am not sure yet what works and what doesn't. What's the recommended way to do this?

pitosalas avatar Jun 28 '19 14:06 pitosalas

I agree, jupyter-ros still has some rough edges. Restarting the kernel will definitely kill the process + node.

However, the usual way of working in Jupyter is to re-run a cell – which doesn't really map that well to ROS development. We might need to improve the handling of jupyter-ros in this regard.

Do you have some toy code to share along which we could try to come up with better workflows?

wolfv avatar Jun 29 '19 06:06 wolfv

Yes I do have toy code, simple examples which are a "transcript" of some of the tf2 tutorials on the ros.org wiki.

For me the confusion is that there's no way to tell whether a node is still running so I will re-run a cell and nothing will happen. I assume because the node is still running from before. The other smaller confusion was just that I didn't realize that I needed to have roscore launched separately.

As I am sure you know, the notebook paradigm that jupyter-ros follows is very different from what we aer used to: no separate terminal tabs, no .launch files, what is the current directory that is active while a notebook is running, etc.

So from my beginners viewpoint I feel like would be useful is:

  1. A way to have roscore run without having to launch it in a terminal (== roscore)
  2. When a jr.subcribe is re-issued on the same topic, don't throw an error, but handle it correctly
  3. A way to know which nodes are running at any point (== rosnodes list)
  4. A way to start and restart and check status of running node from within notebook

Just some guesses!

pitosalas avatar Jul 02 '19 19:07 pitosalas