Skip to content

Pool testing

Maxwell Lin edited this page Sep 2, 2023 · 4 revisions

Pool testing

A collection of frequently used commands during pool tests.

tmux

Launch our pool-test setup:

scripts/docker-pool-test.sh

NOTE: If the onboard and landside docker containers are already running, instead use

scripts/pool-test.sh

Launch onboard container

docker run -td --privileged --net=host -v /home/robot/robosub-ros:/root/dev/robosub-ros -v /dev:/dev dukerobotics/robosub-ros:onboard

Launch landside container

NOTE: For joystick, landside must be running on the Linux laptop

docker run --privileged --net=host -td -p 2201:2201 -v ${PWD}:/root/dev/robosub-ros dukerobotics/robosub-ros:landside

To connect robot onboard to laptop landside

On laptop landside

hostname

On robot onboard, add the laptop IP and hostname to the robot hosts file

nano etc/hosts

Check if laptop landside can communicate with robot onboard

ping {hostname}

To test thrusters and onboard-landside connection

roslaunch offboard_comms serial.launch
rostopic pub -r 10 /offboard/thruster_speeds custom_msgs/ThrusterSpeeds '{speeds: [10,10,10,10,10,10,10,10]}'

NOTE: This must be done with serial.launch instead of motion.launch because motion.launch launches test_state_publisher.py which also publishes to offboard/thruster_speeds.

To set a desired global state for the robot

roslaunch execute motion.launch
rosservice call /enable_controls true
rosrun controls test_state_publisher.py

To launch the joystick:

Start the raw joystick node on the landside computer by executing

roslaunch joystick_raw.launch

Start the joystick pulishing node on either computer by executing

roslaunch pub_joy.launch