I am having some troubles uploading files to my robot.
The script does not execute on my robot (18.104.22.1680), nor when being ran on my simulator by running “sh upload_files.sh”. When executed on the simulator, I get the log message “no mountpoint supplied” given by the start of the program below. When being ran directly on the robot via ssh with the same command (“sh upload_files.sh”), I cannot find any log messages.
"LOGGER="/usr/bin/logger" TAG="-t '$(basename $0)'" if [ "$1" = "" ] ; then $LOGGER -p user.info $TAG "$0: no mountpoint supplied, exiting." exit 1 ; fi MOUNTPOINT="$1""
In the simulator, the log messages are presented in /var/log/syslog. I cannot seem to find the location of this log on the physical robot.
My questions are:
- Is there some bugs in the magic files?
- Where is the log destination on the robot? It would be useful to know, since I need to make some edits to my magic files.
Hi, Looks like when the controller executes the magic file automatically, it passes the mount point of the USB (location of the magic file) as a command line argument to the shell script (stored in $1). So it won’t get that if you just use the sh command used above.
You can get some debug info back out of the sh command using the -x option (verbose mode).
Assuming your current directory contains the magic file, below is one example of how you can pass the location of the file (mount point) to the script:
pwd | xargs sh -x upload_files.sh
The log files will be copied to the directory containing the magic file.
Magic files are designed to run on the real robot, and as the user names/file locations are different under URSIM you’d have to do some additional tinkering to get it to work there.
Hope this helps you to move forward.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.