Skip to content

Commit 289655e

Browse files
authored
Merge pull request #193 from UniversalRobots/add_documentation_link
Add actual documentation link into calibration checker output
2 parents fe344be + dcde457 commit 289655e

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,16 @@ jobs:
2929
- uses: actions/checkout@v1
3030
- uses: 'ros-industrial/industrial_ci@master'
3131
env: ${{matrix.env}}
32+
33+
34+
check_urls:
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v1
38+
- name: check URLs
39+
run: |
40+
echo "$(pwd)"
41+
ls -l
42+
ur_robot_driver/scripts/check_urls.sh -r ur_robot_driver/src/ur
43+
#working-directory: ./ur_robot_driver
44+

ur_robot_driver/scripts/check_urls.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
#Find URLs in code:
6+
urls=$(grep -oP "(http|ftp|https):\/\/([a-zA-Z0-9_-]+(?:(?:\.[a-zA-Z0-9_-]+)+))([a-zA-Z0-9_.,@?^=%&:\/~+#-]*[a-zA-Z0-9_@?^=%&\/~+#-])?" "$@")
7+
8+
fail_counter=0
9+
10+
for item in $urls; do
11+
# echo $item
12+
filename=$(echo "$item" | cut -d':' -f1)
13+
url=$(echo "$item" | cut -d':' -f2-)
14+
# echo "Checking $url from file $filename"
15+
if ! curl --head --silent --fail "$url" 2>&1 > /dev/null; then
16+
echo "Invalid link in file $filename: $url"
17+
((fail_counter=fail_counter+1))
18+
else
19+
echo "$url ok"
20+
fi
21+
done
22+
23+
exit $fail_counter

ur_robot_driver/src/ur/calibration_checker.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ bool CalibrationChecker::consume(std::shared_ptr<primary_interface::PrimaryPacka
3232
LOG_ERROR("The calibration parameters of the connected robot don't match the ones from the given kinematics "
3333
"config file. Please be aware that this can lead to critical inaccuracies of tcp positions. Use the "
3434
"ur_calibration tool to extract the correct calibration from the robot and pass that into the "
35-
"description. See [TODO Link to documentation] for details.");
35+
"description. See "
36+
"[https://github.com/UniversalRobots/Universal_Robots_ROS_Driver#extract-calibration-information] for "
37+
"details.");
3638
}
3739
else
3840
{

0 commit comments

Comments
 (0)