Started Labbook 2012.
September 30, 2011
June 24, 2011
- Tested java -cp ../../jar/ comm.jar:../../jar/commtest.jar:. SerialDemo with a null-modem between ow139 and edu058, but no response. Should repeat it (next year), with another Linux machine (as nb-krose39). Should provide this laptop with the 32bits library from /home/arnoud/lib/linux.
June 23, 2011
- Found a Linux version of javax.comm.properties. Now I get Error instantiating class com.sun.comm.LinuxDriver.
- Driver needs library in LD_LIBRARY_PATH. Found library, but this is 32 bits version. 64bits version is available from IBM (requires installation) .
- Downloaded 64bits library from ibm with nb-nureal. Result is a null-pointer in listPortChoices.
- Tried the example from the ibm package. The command java -cp ../../jar/comm.jar:../../jar/commtest.jar:. SerialDemo ../../lib/javax.comm.properties gives another error: at SerialParameters.setBaudRate(SerialParameters.java:108)
at SerialDemo.loadParams(SerialDemo.java:441)
at SerialDemo.parseArgs(SerialDemo.java:431)
- Problem was the argument. Expects a file with properties portName, baudRate, etc. java -cp ../../jar/
comm.jar:../../jar/commtest.jar:. SerialDemo works. No response from nb-krose03 yet (also no terminal running, so that is not strange.
June 22, 2011
- Tested the SerialPort driver that the Wireloop guys received from Ben Bruidegom to talk to CoachLab. The command java -cp /home/arnoud/src/commapi/jar/comm.jar:. SerialDemo
javax.comm: Can't find javax.comm.properties!
java.io.IOException: javax.comm: platform driver class name = null
(Check 'driver' property in javax.comm.properties)
.
- The README says to use java SerialDemo serialdemo.properties. No properties file exists, it seems that the software uses ../../docs/javax.comm.properties. This defines driver=com.sun.comm.SolarisDriver and serpath0 = /dev/term, Giving this file as argument didn't help, putting as link did. Now it complains about Solaris: java -cp /home/arnoud/src/commapi/jar/comm.jar:/home/arnoud/src/commapi/jar/commtest.jar:. SerialDemo
Error loading SolarisSerial: java.lang.UnsatisfiedLinkError: no SolarisSerialParallel in java.library.path
Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.comm.SunrayInfo.isSessionActive()
.
- Looked at interface for the Wireloop guys. Armcmds has a arm_stop, with 4 parameters:
#define DEAD_STOP 0
#define RAMP_STOP 1
#define FREE_STOP 2
#define FREE_OFF 3
#define NUMBER_OF_STOP_MODES 4
.
- umicmds (including chess_list.c) as example looks like the correct level for them.
- Made an example program from move_list, including a FREE_OFF while moving from zed=900 to zed=400. No effect. FREE_STOP directly stopped any movement. Added two timers of 3 seconds to example. First timer works fine, but arm doesn't go up anymore (added a FREE_OFF a second after FREE_STOP to reset the stop). Now it works fine.
June 16, 2011
- Arranged a serial cable, to check the serial connection between ow139 and edu058. Needed an orange null-modem, and a yellow female-female gender-changer.
- The serial interface can be tested with gtkterm. gtkterm needed libvte. libvte needed glib (version > 2.26). On CentOS version 2.12 was available, on Fedora 2.14. Made glib version 2.29.4.
- Additional requirements: gtk+-2.0 >= 2.20.0' but version of GTK+ is 2.12.8
Downloaded vte-0.20.4. gtk+-2.0 >= 2.14.0' but version of GTK+ is 2.12.8
- Downloaded vte-0.16.14. This version works with glib and gtk+.
- Now gtkterm 0.99.6 complains ( Package requirements (vte >= 0.20)).
- Downloaded gtk+ version 2.14, but again dependencies:
Requested 'glib-2.0 >= 2.17.6' but version of GLib is 2.14.6
Requested 'pango >= 1.20' but version of Pango is 1.18.4
Requested 'cairo >= 1.6' but version of cairo is 1.4.14
June 15, 2011
- Tested on edu058 with xen-services off. Still no response.
June 8, 2011
- Tested the program repository/umi-drivers/test/com. According to wikipedia the default settings for a serial prot are Data Bits=8, Parity=0, Stop Bits=1. ./com /dev/ttyS0 9600 8 1 0 1 works, but no characters are echoed to the console (tried all five dataformats).
- Tried the matlab interface from CMU. I use /opt/arch/matlab-edu_r2009a/bin/mex, while they used matlab-5.3 / matlab-6.0. r2009a complained that it needed at least gcc4.1, while the CMU code is probably made for gcc2. Oldest installation I could found was version 7.0.1 (release 14.1).
- Modified the code, so that it compiles. Now it fails with linker:
/home/cs_ai/packages/binutils-2.17/bin/ld: cannot open linker script file /opt/arch/matlab-edu_r141/extern/lib/glnxa64/mexFunction.map: No such file or directory
- Tried with another version of matlab: 32bits ld doesn't recognize libmx.so.
/opt/arch/matlab-edu_r2009a/bin/glnxa64/libmx.so: file not recognized: File format not recognized
- Combination of matlab-edu_r2009a and gcc-4.2 works!
- After adding the rtxmex directory to the path, the commands work. Yet, the robot only moved its wrist when I asked the mxstatus:
>> mxinit
Resource temporarily unavailable
Resource temporarily unavailable
Resource temporarily unavailable
ID Request: ERROR: 41h not an IP ID
ID Request: ERROR: 0h not an IP ID
ID Request: ERROR: ffffffcdh not an IP ID
>> mxstatus
ans =
0
>>>> rtxmove([800,0,0,0,-pi/2,0]')
joint parameters out of range
Stopped for the moment with rtx_matlab.
- test/dump works fine for edu058 (while robot was ow139, and rtxd running on edu058).
bash-3.2$ ./dump
Pids from IP.
0: 0 0 0 0 0 0 0 0 0 0
1: 1 1 1 1 1 1 1 1 1 1
2: 2 2 2 2 2 2 2 2 2 2
3: 3 3 3 3 3 3 3 3 3 3
4: 4 4 4 4 4 4 4 4 4 4
5: 5 5 5 5 5 5 5 5 5 5
6: 6 6 6 6 6 6 6 6 6 6
7: 7 7 7 7 7
Pids from Array.
0: 200 80 115 90 25 1 3 64 12 0
1: 200 80 115 90 25 1 3 64 12 0
2: 200 50 100 78 78 1 0 64 12 0
3: 200 80 60 9 35 1 3 64 12 0
4: 200 80 60 9 35 1 3 64 12 0
5: 200 80 75 15 23 1 5 64 12 0
6: 200 80 50 6 15 1 5 64 12 0
7: 100 78 78 1 0
- Hostlib doesn't compile for gcc-4.2 (does for gcc-4.1).
From ow139 (and running rtxd) I get:
Pids from IP.
0: 200 80 115 90 25 1 3 64 12 0
1: 200 80 115 90 25 1 3 64 12 0
2: 200 50 100 78 78 1 0 64 12 0
3: 200 80 60 9 35 1 3 64 10 0
4: 200 80 60 9 35 1 3 64 10 0
5: 200 80 75 15 23 1 5 64 12 0
6: 200 80 50 6 15 1 5 64 12 0
7: 100 78 78 1 0
From edu058, I get empty pids (and in the log 'couldn't sent acknowledgement').
- Downloaded minicom-2.5. No response on edu058 or ow139. /dev/ttyS1 is also of group rtxipc on ow139.
- Highest level of shell has several rtx_functions. rtx_probe is in ../daemon/vrtx.c. rtx_status and rtx_status_help are in ./shell/misc.c
- Implemented probe in rtxsh:
rtxsh> probe
/dev/ipc0: No such file or directory
/dev/vme32: No such file or directory
Can not talk to RTX on device 'IPC'
rtxsh> probe /dev/ttyS0
rtxsh>
- Trying two devices after each other is no success:
rtxsh> probe /dev/ttyS0
Received non-zero pointer '0x0150F9F0' to private data
rtxsh> probe /dev/ttyS1
Program received signal SIGSEGV, Segmentation fault.
0x0000000000404011 in docommand (table=0x615580, argc=2, argv=0x7fff2174c340)
at shell.c:342
342 if (b->b_fun)
- Also implemented 'test':
txsh> probe /dev/ttyS0
Received non-zero pointer '0x02384D10' to private data
rtxsh> test
Library with pointer '0x02384D10' successful tested
rtxsh> quit
arm_interrupt: RTX_CMD_QUIT
(arnoud@ow139 204)
Same test is also successful at edu058.
- Also implemented 'finish":
txsh> probe /dev/ttyS0
Received non-zero pointer '0x06210390' to private data
rtxsh> test
Library with pointer '0x06210390' successful tested
rtxsh> finish
Library with pointer '0x06210390' successful finished
rtxsh> probe /dev/ttyS0
emergency_stop 11
arm_interrupt: RTX_CMD_STOP
Segmentation fault
Emergency stop failed: No response
Segmentation fault
- Implemented 'command'. Tried it for 'RTX_CMD_FIRST pid readonly uid':
rtxsh> command -1 -1 0 123
Command with id '-1' gives error-code '67' ~ 0x43
On ow137 I get the same output. Seems to be error code ARM_NOT_SUPPORTED.
- Problem was htonl. Without the conversion, I get:
rtxsh> command 2 0 0 0
Command 'RTX_CMD_INIT' with id '2' receives acknowledgment
Also RTX_CMD_SOAK works. On edu058 I get:
rtxsh> command 2 0 0 0
Command 'RTX_CMD_INIT' with id '2' gives error-code 'No response' with id '0x20'
- In the rtxlog I find 'rtx_init_comms' fails on CMD_TOGGLE_OFF', which is the first call of rtx_init_comms. Should try 'command 28 0 0 0' tomorrow. Also, should try rtxdebug on 3 via command 2 0 3 0. Also try to set a breakpoint in rtx_raw. Seems to fail on line 420, because read_from_rtx returns len==0.
- On edu058 the xen-daemon is running. According to this post, this service should be switched off.
- According to the Xen installation notes: To prevent Xen from taken the ttyS0 as a virtual console add in grub to kernel console=vga and add to module xencons=tty.
June 7, 2011
- At line 207 of downloadlib armerrno has already value NO_CONNECTION (which is correct (set on line 123).
- FreeRtx is called, but program receives SIGSEGV when closing socket.
- Traced _arm_raw_transaction. Everything goes well, except that the message comes back with NO_RESPONSE. Solved a bug in armwarn and armerror.
- Removed direct call of RTX_CMD_INIT. Now shells start, but init_comms still fails:
arm> init_comms
arm: Usage: init_comms
arm> init_comms 1 1
======================= ARM version 6 June 2011
arm: init_comms: No response
- Looked at daemon side. RTX_CMD_FIRST has its own logic and sets RTX_RESP_ACKdirectly. RTX_CMD_INIT is handled by rtx_command. rtx_test is also available.
- rtx_init_comms can be found in daemon/ttyio.c. Making a new daemon fails on linking library elf. Tried to make daemon with gcc-4.1.2. Works for hostlib, but fails on rtxcmds.c. Simply solved. Added debug statements in ttyio.c. Result:
Jun 07 12:39:38 (RTXD) 'rtx_init_comms' fails on CMD_TOGGLE_OFF, which is first call of rtx_raw of rtx_init_comms. Also look at rtx_probe (sets bitrate).
- Created a hg pkg, and did hg clone /opt/stud/robotics/assistance/hgrepos/ /home/arnoud/onderwijs/ZSB/assistance/repository/. We are at revision 552. Commit is only distributed with a push! Created hg-identity by copying Julian's ~/.hgrc.
- Did my first commit hg commit umi-drivers/shell/globals.h. Next step: hg push /opt/stud/robotics/assistance/hgrepos/robotics/. Otherway around, hg update is not enough. That should be hg pull /opt/stud/robotics/assistance/hgrepos/robotics/. Copied hgrc in my local repository .hg, with default push and pull path. After a pull you need a update.
- Tested again on ow139. rtx_init_comms fails on rtx_raw(IPDONTCARE,1,CMD_TOGGLE_OFF,0,0,&len,resp), which can be called from the shell with raw -1 28 0 0 (I hope). Result:
arm> raw -1 28 0 0
arm_interrupt: RTX_CMD_RAW
arm: raw: Privileged command
- The arm is listening, soak init worked:
arm> soak init
arm_interrupt: RTX_CMD_SOAK
.
- Tried the test-directory. make test failed, because rtxlib was missing. cd ../rtxlib;make still has -sun3 commands. make test now fails on missing putstatus, which should be available in crt0/putstatus.c (according to ipcstat.c).
- Tried test1. Has no effect:
bash-3.2$ ./test1
======================= ARM version 24 June 2008
Connecting to daemon running on `ow139':59814
Connecting to daemon running on `ow139':42729
arm_interrupt: RTX_CMD_INIT
arm_interrupt: RTX_CMD_RAW
IP1 version: (55,0) 8a62de30 1 fad24698
arm_interrupt: RTX_CMD_RAW
IP0 version: (55,0) 8a62de30 1 fad24698
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_WRITE
arm_interrupt: RTX_CMD_GO
arm_interrupt: RTX_CMD_STATUS
arm_interrupt: RTX_CMD_STATUS
arm_interrupt: RTX_CMD_STATUS
arm_interrupt: RTX_CMD_STATUS
urrent Position : 0 1 2 3 4 5 6
New Position : 0 1 2 3 4 5 6
Error in Position: 0 1 2 3 4 5 6
- This was done with old and new daemon on ow139. Looked at test1.c. Uncommented first clause, result:
arm_interrupt: RTX_CMD_RAW
arm_interrupt: RTX_CMD_RAW
arm_interrupt: RTX_CMD_RAW
Yippie 2
Yippie 2 means that the response on CMD_IDENTIFY was not RESP_IP_RESTART.
- The third clause had to do with arm_soak_init. Result:
arm_interrupt: RTX_CMD_SOAK
arm_interrupt: RTX_CMD_STATUS
Errno = 20
This errno is NO_RESPONSE (second time same response).
- rtxsh in repository gives also
arm_interrupt: RTX_CMD_INIT
init: No response
This was due to loose cable!!!
- test1 works now. The arm is initializing (and making a lot of noise).
During the soak_init I receive Status = 12, after hitting the stop button Status = 1a.
- Same test on edu058 gives Errno = 20.
IP1 version: (55,0) a322d640 1 bea71698
IP0 version: (55,0) a322d640 1 bea71698
The IP versions are different!
- Looked at methods to check serial ports. On edu058, dmesg | grep ttyS0 gives 0000:00:03.3: ttyS0 at I/O 0xec98 (irq = 193) is a 16550A, while on ow139 gives an additional serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A. The rs232-chip is the same, but on ow139 the interupt is on 4 (as expected for COM1). Also, it seems that a serial8250-driver is active. Both systems have same driver:
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled.
- downloaded com.c which test serial port. Should also look at minicom.
- stty -F /dev/ttyS0 -aseems to give the same output (speed 9600 baud).
June 6, 2011
- Tested the umirtxsimulator on edu058. No robotics in PACKAGEPATH (only my_robotics). /dev/ttyS0 ownership was reset again, so test was rather short.
- cvs update worked until stub_pp. Fails in the last three directories (stub_pp, umi, xml_parser).
- Communication to the server directly fails. "Cannot connect to daemon" is part of the armlib. In downloadlib, the RTXD_PORTINFO is read (/home/rtxipc/ports/rtx), which is currently (edu058, 39899).
- Permission reset. I get now the following error:
Connecting to daemon running on `ow139':33761
Connecting to daemon running on `ow139':57731
init connections : No response
- Comments says that the byteorder conversion by htons is already handled by RTXD_PORTINFO. Switched conversion off in armlib. armlib compiles fine with gcc-4.1.2, but the simulator complains about depreciated cairo library.
- Switched back to gcc-2.95.3. That works, but still the connection is made to ow139 (and not edu058!). My fault, started demo on ow139!
- Port is again writeable. Still 'No response':
U.M.I. RTX Robot Arm
====================
Initialisation Program, UMI version 25 June 2008
======================= ARM version 6 June 2011
Changing network byte order for port from 32917 to 38272
Connecting to daemon running on `edu058':38272
init connections : No response
restart: No response
enable PWM output: No response
- Program fails in call arm_init_comms(1,1). This function is a direct call to err = arm_interrupt(RTX_CMD_INIT,&rtxparams), which returns NO_RESPONSE;
- Tried to make new shell. Failed to make readline.c. Easily solved. Problem is in downloadlib. At the end of the download a RTX_CMD_FIRST is sent and acknowledged. After downloadlib again an arm_interrupt(RTX_CMD_INIT,&rtxparams) is sent. The second time no ACK is received ?! Try tomorrow without this second test.
June 1, 2011
- ow139 (u013570) has now a ethernet socket, yet during the boot the ip0 service fails, so ow139 doesn't seem to have an ip-adress.
- Connected the umirtx to edu058 (u014319), but when I start the daemon with /home/rtxipc/robot/linux/start_daemon.sh, I get the error messages in the /home/rtxipc/logs/rtxlog:
Jun 01 14:14:41 (RTXD) Restarting, listening to port 48021 on edu058
Jun 01 14:14:41 (RTXD) Couldn't open '/dev/ttyS0'
Jun 01 14:14:41 (RTXD) No rtx_ops found for '/dev/ttyS0'
Jun 01 14:14:41 (RTXD) Can not talk to RTX
- ls -galt /dev/ttyS0 gives:
crw-rw---- 1 uucp 4, 64 May 29 06:44 /dev/ttyS0
- No information in the 2007-2009 labbooks.
- ow139 was added to the wrong edu-domain. In the right domain I can login and start the daemon. The UMIRTX only just survived the move from the inner city. The rubberband has a lot of problems going up and down. The command ls -galt /dev/ttyS0 gives:
crw-rw---- 1 rtxipc 4, 64 Jun 1 15:14 /dev/ttyS0
- edu058 has now same permission, the daemon runs, but the umirtxsimulator gives :
U.M.I. RTX Robot Arm
====================
Initialisation Program, UMI version 27 January 2004
======================= ARM version 21 June 2006
init connections : No response
restart: No response
enable PWM output: No response
Can't open the data file 'init.dat'
Using data from program
soak init: No response
general_status: No response
Previous Labbooks