ROS Package: Melodic
Package name: rover
To clone this package:
-
Create a folder (name doesn't matter)
-
Create a src folder inside
-
git clone this repository into this src folder
-
cd ../..
-
catkin_make
To run this package:
-
Compile the package by running this command in the project folder (the folder you created):
catkin_make
-
Run each nodes by typing in this command:
rosrun rover {name of the node}
-
Connect to the router wi-fi: (possibly rsx_rover_router, password: rsx123rsx123)
-
Use the following command: command: ssh rsx@192.168.1.50 (Jetson ip address) password: rsx123
- Connect to rsx_rover_router
- Go to this link: http://whatsmyrouterip.com/
- Type in wi-fi IP address into search bar.
- Get Jetson's IP address from device list.
- change ssh command to reflect the new IP address.
Go into Bashrc: ~/.bashrc
scroll to the bottom and find two lines: ROS_MASTER_URI
and ROS_IP
set ROS_MASTER_URI
to the Jetson ipAddress
set ROS_IP
to the current device's ipAddress
type ifconfig
to find the current ip address
type: source ~/.bashrc
to set the changes into effect
Restart all the terminals if it still doesn't work
Pull latest version of the drive board branch of rover Open 4 terminal windows and run the following commands in each in the given order.
-
roscore
-
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=57600
If the above doesn't work, it's probably because the Arduino is on a different port.
Change ttyACM0 to ttyACM1 and try that. If that doesn't work, you can check which port the Arduino is attached to by looking in the bottom right corner of the Arduino IDE. -
rosrun rover drive_sender
-
rosrun joy joy_node
If running rosrun rover drive_sender
says the rover package is not found, close all terminal windows and run:
source ~/catkin_ws/devel/setup.bash
It may be convenient to run this automatically every time a new terminal window is opened by adding it to .bashrc by typing:
echo "source ~/catkin_ws/devel/setup.bash">>~/.bashrc
If all the programs run properly but nothing is showing on screen, it is possible the controller
has not been configured. Close all terminal windows, and type:
roscore
Then in a new window, type:
rosparam set joy_node/dev "/dev/input/jsX"
Where X is a number. This instructions for finding this value can be found here.
Shortcut commands (works on the rsx laptop and the jetson):
nvidia
(ssh into nvidia)
core
(start roscore)
drive1
(run drive receiver node)
drive2
(run drive sender node)
-
Upload the Drive_receiver Arduino code on the Arduino
-
ssh into the nvidia jetson and run roscore
-
Run the receiver node in the jetson using this command (using your port number):
rosrun rosserial_python serial_node.py _port:=/dev/ttyACM# _baud:=57600
Alternatively, usedrive1
-
On the separate command window, use this command:
rosrun rover drive_sender
ordrive2
-
Control the rover using the arrow keys
-
roscore
-
on Jetson (Or any device with the stereo camera and RTABMAP setup):
roslaunch rover traverse.launch
-
On the groundstation computer:
rosrun rviz rviz to visualize the rover
-
Install openrave. Follow these instructions.
-
Go to arm control folder
-
Run script with
./filename.ext
(If it's not an executable, ensure
#!/Use/bin/env python
is at the top of filename.ext and typechmod +x filename.ext
in the terminal)Openrave is mainly used for visualization, whilst the main control is done in the script.
To make a visual model of the arm follow these steps:
- Make an arm model in a urdf file format. Follow this tutorial to assist you.
- Convert a urdf file into a collada file. Follow this page for assistance with that.
- In the collada (*.dae) file, due to some bugs, manually change the arm links parameters with the help of the file Arm_visualization_params_manual.odt
- Make sure that the collada file name is the same as in environment.xml
- Your visual model is set now, enjoy!
To run using ROS, steps (make sure you have the joystick connected beforehand):
- Make sure that your computer is configured properly. The catkin package should be made. In ~/.bashrc file make sure you export correct
ROS_MASTER_URI
andROS_IP
(Note: be careful when usingROS_IP
together withROS_HOSTNAME
, as they are mostly mutually exclusive) - to run the Master, type
roscore
in the command line - to run the Arm Listener, which listenes for the angle values (usually run on the rover computer), type
rosrun rover arm_listener_ROS.py
- to run the control script (usually run on the ground station computer controlling the arm), in the root of the cloned from github "rover" folder type
rosrun rover arm_control_RSX_2018_ROS.py
For using the arm camera, go through the camera manual. Its IP is 192.168.0.10 (make sure the network is 192.168..)