This repository is for all Michigan RobotX Code Development and Builds
Basic Network Setup:
-
Make sure both the ops laptop and the WAM-V computer are on the same network.
Puget IP: 192.168.1.103
Laptop IP: 192.168.1.104 -
On Puget (in every terminal you open):
export ROS_IP=192.168.1.103
export ROS_MASTER_URI=http://192.168.1.103:11311
- On Laptop (in every terminal you open):
export ROS_IP=192.168.1.104
export ROS_MASTER_URI=http://192.168.1.103:11311
Steps 2 and 3 can also be put into the ~/.bashrc file on both the systems.
- ssh into the Puget from the laptop with the following details:
ssh [email protected]
password: RobotXuser!
On Puget:
- Open 4 terminals on Puget
Terminal 1 - Runroscore
export ROS_IP=192.168.1.103
export ROS_MASTER_URI=http://192.168.1.103:11311
roscore
Terminal 2 - Run the transform publisher
export ROS_IP=192.168.1.103
export ROS_MASTER_URI=http://192.168.1.103:11311
rosrun wamv_bringup wamv_tf_publisher
Terminal 3 - Run the drivers and odometry node
export ROS_IP=192.168.1.103
export ROS_MASTER_URI=http://192.168.1.103:11311
roslaunch wamv_bringup bringup_puget.launch
Terminal 4 - Run gmapping package
export ROS_IP=192.168.1.103
export ROS_MASTER_URI=http://192.168.1.103:11311
rosrun gmapping slam_gmapping scan:=/vel1/scan
Make sure all the above nodes are registered to the master at 192.168.1.103:11311
otherwise you won't be able to visualize the topics on the laptop
On Laptop:
- Open 2 Terminals on the Laptop
Terminal 1 - Connect to the Master and visualize data on Rviz
export ROS_IP=192.168.1.104
export ROS_MASTER_URI=http://192.168.1.103:11311
Check if the laptop is connected by echo-ing the following topics:
rostopic list
# check if you can recieve the camera images
rostopic echo /ladybug_camera/camera0/image_raw/compressed
# check if you can receive the velodyne scan
rostopic echo /vel1/scan
# check if you can receive the odometry
rostopic echo /gps/odom
# check if you receive the correct transform data
rostopic echo /tf
If all the above works, finally run the visualization package on the laptop
roslaunch wamv_bringup bringup_laptop.launch
Terminal 2 - Bring up the joystick controller:
i) Check the joystick input
sudo jstest /dev/input/jsX
it will usually be js1
ii) Change the js permissions
sudo chmod a+rw /dev/input/jsX
iii) set the ros parameters
rosparam set joy_node/dev "/dev/input/jsX"
iv) Run joy_node
rosrun joy joy_node