Commit b3ab117a authored by Nicholas Shindler's avatar Nicholas Shindler

clean up imports + update readme

parent be299eb7
......@@ -4,6 +4,11 @@ bridging application to connect the harvest vehicle robots with the robotics ope
### Documentation
see [wiki](https://gitsvn-nt.oru.se/hkan/harvest-automation/wikis/home) for full documentation.
#### Project Notes
This project manages comunication with the Harvest Automation Robots and ROS Melodic. This project has been designed to be run using Ubuntu 18 on a PC or Ubuntu Server 18 on a RaspberryPi 4. No other configurations have been tested, and not other versions of ROS have been tested.
A preconfigured RaspberryPi disk image (for a 32GB disk) can be downloaded [here](https://cloud.oru.se/s/DJ4sG9yTLsiMZ38), specific instructions for setup can be found in the [Wiki](https://gitsvn-nt.oru.se/hkan/harvest-automation/wikis/setup).
### Open Source
this is being developed with Orebro University and is for academic use.
......
#!/usr/bin/env python
import rospy
from geometry_msgs.msg import Twist
from std_msgs.msg import Float64
import sys, os
......
import socket
import select
import struct
import code
import threading
import Queue
import time
import os
import sys
import subprocess
import rospy
import traceback
from socket import error as SocketError
class listen(threading.Thread):
......
import math
import struct
### various utility functions shared by multiple modules ###
......@@ -9,21 +8,10 @@ def twist_to_vel(twist):
# assumes x is forward/backward and y is lateral.
r = 0.25
L = 1.0
# x = twist.linear.x
# y = twist.linear.y
# v = math.sqrt(math.exp(x)+math.exp(y))
# if(x == 0):
# th = y
# else:
# th = math.atan(y/x)
v = twist.linear.x
th = twist.angular.z
left = (2 * v - L * th) / 2 * r
right = (2 * v + L * th) / 2 * r
# if (left > right):
# right = 0
# elif (right > left):
# left = 0
return [left, right]
......
#!/usr/bin/env python
from std_msgs.msg import Float64
from std_msgs.msg import Header
from std_msgs.msg import Int16MultiArray
from sensor_msgs.msg import PointField
from sensor_msgs.msg import PointCloud2
from geometry_msgs.msg import PointStamped
import sensor_msgs.point_cloud2 as pc2
import math
import time
import rospy
import struct
import sys, os
......
#!/usr/bin/env python
from std_msgs.msg import Float64
from nav_msgs.msg import Odometry
from geometry_msgs.msg import (
PoseWithCovariance,
......
......@@ -5,9 +5,9 @@ from __future__ import print_function
# import roslib; roslib.load_manifest('teleop_twist_keyboard')
import rospy
from geometry_msgs.msg import Twist
from std_msgs.msg import Float32, Float64
from std_msgs.msg import Float32
import sys, os, select, termios, tty, math
import sys, select, termios, tty
import argparse, time
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment