Skip to content

Commit

Permalink
working shammin
Browse files Browse the repository at this point in the history
  • Loading branch information
shamin1998 committed Nov 9, 2018
1 parent db9a357 commit 8d502c4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kgpkubs_launch/scripts/ssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi

launcher "core" "roscore"
pr_launcher "vision" "vision.launch"
# pr_launcher "belief_state" "belief_state.launch"
pr_launcher "belief_state" "belief_state.launch"
pr_launcher "grsim_comm" "grsim_comm.launch"


Expand Down
2 changes: 1 addition & 1 deletion kubs/kubs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class kubs:
## @param kubs_id The kubs identifier
##

def __init__(self, kubs_id, pub):
def __init__(self, kubs_id, BState, pub):
self.kubs_id = kubs_id
self.vx = 0
self.vy = 0
Expand Down
2 changes: 1 addition & 1 deletion ompl_planner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ find_package(catkin REQUIRED COMPONENTS
std_msgs
krssg_ssl_msgs
)
find_package(OMPL REQUIRED)
find_package(ompl)
find_package(OpenCV REQUIRED)

catkin_package()
Expand Down
9 changes: 7 additions & 2 deletions test_GoToPoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,19 @@ def GUI_Callback(data):
kub = kubs.kubs(BOT_ID, BState, pub)

def BS_callback(data):
print('BS_callback running...')
global homePos, REPLANNED
global awayPos, start_time, BState, kub
BState = data
homePos = data.homePos
awayPos = data.awayPos
print("homePos = ",homePos)
print("awayPos = ",awayPos)
t = rospy.Time.now()
t = t.secs + 1.0*t.nsecs/pow(10,9)
print(" t - start = ",t-start_time)
[vx, vy, vw, REPLANNED] = Get_Vel(start_time, t, BOT_ID, data.ballPos, homePos, awayPos) #vx, vy, vw, replanned
[vx, vy, vw, REPLANNED] = Get_Vel(start_time, t, BOT_ID, data.ballPos, homePos, awayPos)
#vx, vy, vw, replanned
print("-------------------REPLANNED = ",REPLANNED)
if(REPLANNED):
reset()
Expand All @@ -65,7 +69,8 @@ def BS_callback(data):
rospy.init_node('node_new',anonymous=False)
start_time = rospy.Time.now()
start_time = 1.0*start_time.secs + 1.0*start_time.nsecs/pow(10,9)
pub = rospy.Publisher('/grsim_data', gr_Commands, queue_size=1000)
pub = rospy.Publisher('/grsim_data', gr_Commands, queue_size=1000)
print('testing...')
rospy.Subscriber('/belief_state', BeliefState, BS_callback, queue_size=1000)
rospy.Subscriber('/gui_params', point_SF, GUI_Callback, queue_size = 1000)
rospy.spin()
Expand Down
2 changes: 1 addition & 1 deletion velocity/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def distance_(a, b):
return sqrt(dx*dx+dy*dy)

def Get_Vel(start, t, kub_id, target, homePos_, awayPos_,avoid_ball=False):
# print("Get_Vel: t - start = ",t-start)
print("Get_Vel: t - start = ",t-start)
global expectedTraverseTime, REPLAN, v, errorInfo, pso, FIRST_CALL, homePos, awayPos, kubid, prev_target
REPLAN = 0
homePos = homePos_
Expand Down

0 comments on commit 8d502c4

Please sign in to comment.