tutorials:accessdesktoptorobot:start

Access a real robot from your desktop computer

Prerequisite

Install SmartSoft World on the Desktop Computer.

NOTE: replace 'robotino' by your robots username, and '10.36.32.135' by your robots ip-address or hostname

Selected names and ip-addresses used by the Service Robotics Research Center Ulm:

  • SRRC1
    • Robotino 3 robot with conveyor belt, SICK LMS100, Intel Realsense
    • ssh -L 59026:localhost:5901 -C -N -f -l robotino c26-26-robotino3
      xtightvncviewer :59026
       
  • SRRC4
    • Robotino 4 robot with SICK LMS100, Intel Realsense
    • ssh -L 59135:localhost:5901 -C -N -f -l robotino 10.36.32.135
      xtightvncviewer :59135
       
  • SRRC20
    • Pioneer P3DX robot with SICK LMS200, Intel Realsense
    • 10.36.32.226 = i-srrc-ws-robo-02wlan
    • 10.36.32.225 = i-srrc-ws-robo-02eth
    • ssh -L 59226:localhost:5901 -C -N -f -l student 10.36.32.226
      xtightvncviewer :59226
       
  • SRRC23
    • Pioneer P3DX robot with SICK LMS200, Intel Realsense
    • 10.36.32.228 = i-srrc-ws-robo-04wlan
    • 10.36.32.227 = i-srrc-ws-robo-04eth
    • ssh -L 59228:localhost:5901 -C -N -f -l student 10.36.32.228
      xtightvncviewer :59228
       
  • SRRC24
    • Pioneer P3DX robot with SICK LMS200, Intel Realsense
    • 10.36.32.224 = i-srrc-ws-robo-03wlan
    • 10.36.32.223 = i-srrc-ws-robo-03eth
    • ssh -L 59224:localhost:5901 -C -N -f -l student 10.36.32.224
      xtightvncviewer :59224
       

Login without password

Install permanently a login key from the desktop computer to the robot.

ssh-copy-id robotino@10.36.32.135

If you get an error message (ERROR: No identities found), then you need to run ssh-keygen first. When asked for filename or password, just press enter key, so default file and empty password is used. Then run the above ssh-copy-id command again.

Login by Terminal

Simple ssh terminal which forwards graphical output from the robot to the desktop computer (X11-forwarding)

ssh -X robotino@10.36.32.135

Now you can enter commands from your computer to a terminal on the robot.

Remote access by VNC

Install a VNC viewer:

sudo apt update
sudo apt install xtightvncviewer

Make a ssh tunnel from Port 59135 of desktop computer to port 5901 of robot (once per reboot) and start VNC:

ssh -L 59135:localhost:5901 -C -N -f -l robotino 10.36.32.135
xtightvncviewer :59135

Now you can access the robot in the graphical window 'TightVNC'.

For a second robot with a different ip-adress, replace 59135 by another free port number, e.g.:

ssh -L 59226:localhost:5901 -C -N -f -l robotino 10.36.32.226
xtightvncviewer :59226

Deploy and Start a System on the Robot

Eclipse Smartsoft > Project Explorer > your System > model > *.target :

Edit and save the robots values after 'HostAdress' (e.g. “10.36.32.135”) and 'LoginAccount' (e.g. robotino).

Do the same for … > model > *.deployment and 'LoginAccount'.

Right click on the system name in the project explorer, select 'Run Code-Generation' to update the changes.

Now you can Start and Stop a System by Menu.

(Note: the SICK LMS100 needs 30 seconds to warm up, that is why the Robotino is not moving directly after start)

Manually Deploy, Start, Debug and Stop a System

If a component is crashing, a debugger can give more information why it crashed.

After deploying the system, 'quit' the menu (instead of selecting 'Start' as usual). Connect to the robot by SSH or VNC. On the robot do:

cd /tmp/System*
mousepad start-*

Note: instead of 'ComponentABC', type the name of the crashing component

Search for

PATH; $SCRIPT_DIR/ComponentABC

and change it to

PATH; gdb --args $SCRIPT_DIR/ComponentABC

Manually start the system

bash start-* start

Now select the terminal with the crashing component, enter here in the debugger the command:

run

After it crashed, enter:

backtrace

The backtrace shows the chain of function calls leading to the crash, in this format:

#AAA 0xBBB in CCC at DDD:EEE

AAA = frame number, e.g. #3
BBB = frame pointer, e.g. 0x0000555555722cef
CCC = function call, e.g. RGBDTask::on_execute()
DDD = source file, e.g. /home/feldmeier/SOFTWARE/smartsoft/repos/ComponentRepository/ComponentVisualization/smartsoft/src/RGBDTask.cc
EEE = line number, e.g. 78

to show more details of one of these function call frames, first select the frame number, then show infos about it, e.g. for frame 3:

frame 3
info frame
info args
info locals

If the binaries are deployed from your desktop computer to another roboter, but there are different versions of a third party library linked to it, this could crash too.

E.g. check the OpenCV library version linked to ComponentVisualization on the desktop computer:

cd $SMART_ROOT_ACE/bin
ldd ComponentVisualization | grep opencv

Do the same in the /tmp/System* folder on the robot. The version number should be equal to the one of the desktop computer. Manually stop the system

bash start-* stop

Acknowledgments

Thomas Feldmeier.

tutorials/accessdesktoptorobot/start.txt · Last modified: 2023/01/17 13:26 by admin

DokuWiki Appliance - Powered by TurnKey Linux