Skip to content

Commit

Permalink
merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeffrey committed Dec 4, 2019
1 parent 7430276 commit 952edc4
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 10 deletions.
19 changes: 19 additions & 0 deletions alternative_velodyne_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

echo "Running Different Velodyne Setup Script"

echo "Shutting Down WiFi"

nmcli radio wifi off

sudo ifconfig eth0 up

echo "Assigning IP to Port"

sudo ip addr add 192.168.1.200 dev eth0

echo "Adding static route to LIDAR IP"

sudo route add -net 192.168.1.0 netmask 255.255.255.0 dev eth0

echo "Try running the velodyne manager now"
6 changes: 3 additions & 3 deletions cart_endpoints/scripts/motor_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ def __init__(self):
rospy.loginfo("Starting motor node!")
#Connect to arduino for sending speed
try:
rospy.loginfo("remove comments")
#self.speed_ser = serial.Serial(cart_port, 57600, write_timeout=0)
#rospy.loginfo("remove comments")
self.speed_ser = serial.Serial(cart_port, 57600, write_timeout=0)
except Exception as e:
print( "Motor_endpoint: " + str(e))
rospy.logerr("Motor_endpoint: " + str(e))
Expand Down Expand Up @@ -113,7 +113,7 @@ def send_to_motors(self):
else:
bitstruct.pack_into('u8u8u8u8u8', data, 0, 42, 21, abs(target_speed), 0, target_angle)

#self.speed_ser.write(data)
self.speed_ser.write(data)


if __name__ == "__main__":
Expand Down
7 changes: 2 additions & 5 deletions cart_endpoints/scripts/ros_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ def send_audio(msg):
}
send('audio',JSON.dumps(json))

#audio call pullover
def sendPullOver():
send('pull_over',id)

#pose tracking send when unsafe
def sendUnsafe():
Expand All @@ -65,7 +62,7 @@ def sendPassengerExit():
def sendReady():
send('passenger_ready',id)

def sendLocation():
def sendLocation(self):
send('current_location',id)

@sio.on('pull_over',namespace='/cart')
Expand Down Expand Up @@ -122,7 +119,7 @@ def status_update(data):
def pullover_callback(msg):
if msg.data == True:
send_stop(True, 2)
sendPullOver()
sendUnsafe()
else:
send_stop(False, 2)
sendReady() #is this how it should work?'
Expand Down
3 changes: 1 addition & 2 deletions cart_endpoints/scripts/test_live_analysis_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from sklearn.ensemble import RandomForestClassifier
import paho.mqtt.client as mqtt
from std_msgs.msg import Int8, String, Bool
from navigation_msgs import EmergencyStop
import json

# Add openpose to system PATH and import
Expand Down Expand Up @@ -153,7 +152,7 @@ def analyze():
#Analyze passenger safety.
# Returns np array
def safety_check(frame):
filename = 'full_dataset_model.sav'
filename = '/home/jeffercize/catkin_ws/src/ai-navigation/cart_endpoints/scripts/full_dataset_model.sav'
loaded_model = pickle.load(open(filename, 'rb'))
if (len(frame.shape) == 0):
frame = np.zeros((1,75))
Expand Down
17 changes: 17 additions & 0 deletions velodyne_setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

echo "Running Velodyne Setup Script"

echo "Shutting Down WiFi"

nmcli radio wifi off

echo "Assigning IP to Port"

sudo ifconfig eno1 192.168.3.100

echo "Adding static route to LIDAR IP"

sudo route add 192.168.1.201 eno1

echo "Try running the velodyne manager now"

0 comments on commit 952edc4

Please sign in to comment.