The following documentation outlines the steps required to run the CompactWarehouseRobotNavi (UCL EEE Final Year Project).
- Clone Repository
- Project structure
- Installation and Setup
- Running the Program
- FAQ / Troubleshooting
Git clone from the GitHub Repository and checkout to the master branch
$ git clone https://github.com/zhenghung/CompactWarehouseRobotNavi
$ git checkout master
- ROS-kinetic
- Arduino
- rosserial
Required: Local Network allowing port forwarding, if none is available a locally hosted hotspot works just fine.
- Find out your local IP address.
$ hostname -I
- Add the config to your .bashrc file, replacing
<Remote Computer IP>
with the local IP address, e.g.10.42.0.1
.
$ echo "export ROS_IP=0.0.0.0" >> ~/.bashrc
$ echo "export ROS_HOSTNAME=<Remote Computer IP>" >> ~/.bashrc
$ echo "export ROS_MASTER_URI=http://<Remote Computer IP>:11311" >> ~/.bashrc
- Connect to the same local network as ROS Master
- Find your local IP address.
$ hostname -I
- Add the config to your .bashrc file,
- Replace
<Remote Computer IP>
with the local IP address, e.g.10.42.0.41
. - Replace
<ROS Master IP>
with the ROS Master IP address, e.g.10.42.0.1
. (Must be same as the server device ROS_MASTER_URI)
- Replace
$ echo "export ROS_IP=0.0.0.0" >> ~/.bashrc
$ echo "export ROS_HOSTNAME=<Remote Computer IP>" >> ~/.bashrc
$ echo "export ROS_MASTER_URI=http://<ROS Master IP>:11311" >> ~/.bashrc
Note that your local IP changes based on the network your computer is connected to, so edit the ~/.bashrc file as needed, then source the file
Start ROS Master.
$ roscore
Start arduino serial node.
Replace <Arduino Serial Port>
with the serial port assigned. (e.g. /dev/ttyACM0
)
$ sudo chmod 666 <Arduino Serial Port>
$ rosrun rosserial_python serial_node.py <Arduino Serial Port>
From within the repository directory,
$ python python/robotmover/robotmover_manual.py
Enter a command and press the <ENTER>
key. Robot will execute last command until told otherwise.
Note: Robot will not stop automatically
Commands:
w
: Robot moves forwarda
: Robot turns lefts
: Robot stopsd
: Robot turns right
To view the robot position in RVIZ. Republish the /CompressedMsg
topic into /odom
From within the repository directory,
$ python python/robotmover/pubsub.py
Then open rviz to view /odom
$ rosrun rviz rviz
Start ROS Master.
$ roscore
Start arduino serial node.
Replace <Arduino Serial Port>
with the serial port assigned. (e.g. /dev/ttyACM0
)
$ sudo chmod 666 <Arduino Serial Port>
$ rosrun rosserial_python serial_node.py <Arduino Serial Port>
Start lidar serial node.
Replace <Lidar Serial Port>
with the serial port assigned. (e.g. /dev/ttyUSB0
)
$ sudo chmod 666 <Lidar Serial Port>
$ roslaunch rplidar_ros rplidar.launch
Republish the /CompressedMsg
topic into /odom
.
From within the repository directory,
$ python python/robotmover/pubsub.py