Added small script to test wheels
This commit is contained in:
82
scripts/test_wheel.sh
Executable file
82
scripts/test_wheel.sh
Executable file
@@ -0,0 +1,82 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
TARGET="$1"
|
||||||
|
|
||||||
|
if [[ "$TARGET" == "-h" || "$TARGET" == "--help" ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $# -lt 1 ]]; then
|
||||||
|
echo "Error: Expected at least 1 arg"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $# -ge 2 ]]; then
|
||||||
|
SPEED="$2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
source install/setup.bash
|
||||||
|
|
||||||
|
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
||||||
|
|
||||||
|
case $TARGET in
|
||||||
|
"forward")
|
||||||
|
ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/TwistStamped "
|
||||||
|
header: auto
|
||||||
|
twist:
|
||||||
|
linear:
|
||||||
|
x: ${SPEED:-0.4}
|
||||||
|
y: 0.0
|
||||||
|
z: 0.0
|
||||||
|
angular:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
z: 0.0"
|
||||||
|
;;
|
||||||
|
"backward")
|
||||||
|
ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/TwistStamped "
|
||||||
|
header: auto
|
||||||
|
twist:
|
||||||
|
linear:
|
||||||
|
x: ${SPEED:--0.8}
|
||||||
|
y: 0.0
|
||||||
|
z: 0.0
|
||||||
|
angular:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
z: 0.0"
|
||||||
|
;;
|
||||||
|
"left")
|
||||||
|
ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/TwistStamped "
|
||||||
|
header: auto
|
||||||
|
twist:
|
||||||
|
linear:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
z: 0.0
|
||||||
|
angular:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
z: ${SPEED:-0.4}"
|
||||||
|
;;
|
||||||
|
"right")
|
||||||
|
ros2 topic pub --rate 10 /cmd_vel geometry_msgs/msg/TwistStamped "
|
||||||
|
header: auto
|
||||||
|
twist:
|
||||||
|
linear:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
z: 0.0
|
||||||
|
angular:
|
||||||
|
x: 0.0
|
||||||
|
y: 0.0
|
||||||
|
z: ${SPEED:--0.4}"
|
||||||
|
;;
|
||||||
|
"zero")
|
||||||
|
ros2 service call /zero std_srvs/srv/Empty
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Target not defined"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
Reference in New Issue
Block a user