Skip to content

Commit

Permalink
Merge pull request #193 from UniversalRobots/add_documentation_link
Browse files Browse the repository at this point in the history
Add actual documentation link into calibration checker output
  • Loading branch information
fmauch authored Jun 16, 2020
2 parents fe344be + dcde457 commit 289655e
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 1 deletion.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,16 @@ jobs:
- uses: actions/checkout@v1
- uses: 'ros-industrial/industrial_ci@master'
env: ${{matrix.env}}


check_urls:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: check URLs
run: |
echo "$(pwd)"
ls -l
ur_robot_driver/scripts/check_urls.sh -r ur_robot_driver/src/ur
#working-directory: ./ur_robot_driver

23 changes: 23 additions & 0 deletions ur_robot_driver/scripts/check_urls.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

set -e

#Find URLs in code:
urls=$(grep -oP "(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))([a-zA-Z0-9_.,@?^=%&:\/~+#-]*[a-zA-Z0-9_@?^=%&\/~+#-])?" "$@")

fail_counter=0

for item in $urls; do
# echo $item
filename=$(echo "$item" | cut -d':' -f1)
url=$(echo "$item" | cut -d':' -f2-)
# echo "Checking $url from file $filename"
if ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
echo "Invalid link in file $filename: $url"
((fail_counter=fail_counter+1))
else
echo "$url ok"
fi
done

exit $fail_counter
4 changes: 3 additions & 1 deletion ur_robot_driver/src/ur/calibration_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ bool CalibrationChecker::consume(std::shared_ptr<primary_interface::PrimaryPacka
LOG_ERROR("The calibration parameters of the connected robot don't match the ones from the given kinematics "
"config file. Please be aware that this can lead to critical inaccuracies of tcp positions. Use the "
"ur_calibration tool to extract the correct calibration from the robot and pass that into the "
"description. See [TODO Link to documentation] for details.");
"description. See "
"[https://github.com/UniversalRobots/Universal_Robots_ROS_Driver#extract-calibration-information] for "
"details.");
}
else
{
Expand Down

0 comments on commit 289655e

Please sign in to comment.