I am fairly new to Ubuntu 14.04. I am doing a school project where I need to use navigation stacks. At this point the navigation works fine. My problem at this time is:
Before I can launch rviz
and to do the actual navigation I have to execute the following commands:
sudo mknod -m 666 /dev/ttyS51 c 4 115
sudo socat PTY,link=/dev/ttyS51, TCP4:192.168.0.60:10002
sudo chmod a=r+w /dev/pts/*
There are some extra commands I need to run, but I think you guys get the picture.
At this point I have to manually enter all these commands into the terminal. I have added them to a shell file which I can launch manually.
I would like to know if it is possible to execute this shell file from a .launch
file. The same way a node is launched from within a .launch
file.
It would make it a lot easier if I can add a piece of code to the existing launch file so that these commands and the rest of the nodes necessary for the navigation are executed when I input the following command:
roslaunch navigation2d_example move_base.launch
The name of my shell file is: mobi_mani.sh
Code inside is:
#!/bin/sh
sudo mknod -m 666 /dev/ttyS51 c 4 115
sudo socat PTY,link=/dev/ttyS51, TCP4:192.168.0.60:10002
sudo chmod a=r+w /dev/pts/* "
Long story short.
How can I execute the commands stated in a .sh
file from a .launch
file?
Also, can I get feedback on the screen of my terminal? so I know what is going on.
Apologies for my English, I am Dutch.
Thanks in advance!
.desktop
file:Terminal=true
possibly you'll need to edit the terminal preferences to keep it open after the command ran. Let me know!