Skip to content

Commit

Permalink
fix for python3
Browse files Browse the repository at this point in the history
python3 -m compileall . -q
  • Loading branch information
knorth55 authored and pazeshun committed Aug 16, 2023
1 parent 84b08da commit 6975ab0
Show file tree
Hide file tree
Showing 27 changed files with 188 additions and 188 deletions.
2 changes: 1 addition & 1 deletion archives/color_histogram_matcher_test.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions archives/demo_real.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions archives/interface_test.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion archives/move_arm2target_bin_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions archives/move_arm_listener.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions archives/move_left_arm_server.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions archives/move_right_arm_server.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion archives/setup_params.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions archives/test_move_left_arm_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions archives/test_move_right_arm_client.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@

# Additional stuff for the LaTeX preamble.
'preamble': "".join((
'\usepackage[utf8]{inputenc}',
'\\usepackage[utf8]{inputenc}',
# NO-BREAK SPACE
'\DeclareUnicodeCharacter{00A0}{ }',
# BOX DRAWINGS LIGHT VERTICAL AND RIGHT
Expand Down
2 changes: 1 addition & 1 deletion jsk_2015_05_baxter_apc/node_scripts/check_after_baxter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

if __name__ == "__main__":

print HEADER+"= Check Start After Baxter.launch =", ENDC
print(HEADER+"= Check Start After Baxter.launch =", ENDC)

index_print("== Check MASTER ==")
check_rosmaster()
Expand Down
2 changes: 1 addition & 1 deletion jsk_2015_05_baxter_apc/node_scripts/check_after_boot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

if __name__ == "__main__":

print HEADER+"= Check Start AFTER BOOT =", ENDC
print(HEADER+"= Check Start AFTER BOOT =", ENDC)

index_print("== Check MASTER ==")
check_rosmaster()
Expand Down
8 changes: 4 additions & 4 deletions jsk_2015_05_baxter_apc/node_scripts/check_after_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@

def check_vacuum(arm):
topic_name = "/vacuum_gripper/limb/"+arm
print HEADER+BOLD+"=== Check " +topic_name + " ===" +ENDC
print(HEADER+BOLD+"=== Check " +topic_name + " ===" +ENDC)
pub = rospy.Publisher(topic_name, Bool, queue_size=1)
msg = Bool()
msg.data = True
time.sleep(3)
print INFO,"Start " + arm + " Vacuum for 5 seconds..."
print(INFO,"Start " + arm + " Vacuum for 5 seconds...")
pub.publish(msg)
time.sleep(5)

print INFO,"Stop " + arm + " Vacuum"
print(INFO,"Stop " + arm + " Vacuum")
msg = Bool()
msg.data = False
pub.publish(msg)

if __name__ == "__main__":

print HEADER+"= Check Start APC Setup =", ENDC
print(HEADER+"= Check Start APC Setup =", ENDC)

index_print("== Check MASTER ==")
check_rosmaster()
Expand Down
32 changes: 16 additions & 16 deletions jsk_2015_05_baxter_apc/node_scripts/check_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@
is_topic_published=False
first_time_callback=True
def success_print(msg):
print OKGREEN, "[OK] : " , msg, ENDC
print(OKGREEN, "[OK] : " , msg, ENDC)

def warning_print(msg):
print WARNING , "[WARN] : " , msg , ENDC
print(WARNING , "[WARN] : " , msg , ENDC)

def fail_print(msg):
print FAIL, "[FAIL] : " , msg , ENDC
print(FAIL, "[FAIL] : " , msg , ENDC)

def index_print(msg):
print OKBLUE+BOLD+msg, ENDC
print(OKBLUE+BOLD+msg, ENDC)

def check_param(param_name, expected, must=False):
if not rospy.has_param(param_name):
Expand All @@ -53,7 +53,7 @@ def check_publish_callback(msg, callback_args):
is_topic_published = True

if callback_args["print_data"] and first_time_callback:
print INFO+"---"
print(INFO+"---")
first_time_callback = False
field_filter_fn = rostopic.create_field_filter(False, True)
callback_echo = rostopic.CallbackEcho(callback_args["topic"], None, plot=False,
Expand All @@ -62,7 +62,7 @@ def check_publish_callback(msg, callback_args):
offset_time=False, count=None,
field_filter_fn=field_filter_fn)
callback_echo.callback(msg, callback_args)
print ENDC
print(ENDC)

def check_publishers(topic_name):
master = rosgraph.Master('/rostopic')
Expand All @@ -76,7 +76,7 @@ def check_publishers(topic_name):
def check_topic(topic_name,
print_data = False,
timeout = 1):
print HEADER+BOLD+"=== Check " +topic_name + " ===" +ENDC
print(HEADER+BOLD+"=== Check " +topic_name + " ===" +ENDC)
global is_topic_published, first_time_callback
first_time_callback = True

Expand Down Expand Up @@ -120,20 +120,20 @@ def check_node(target_node_name, needed, sub_success="", sub_fail=""):
if needed:
success_print("Node " + target_node_name + " exists")
if sub_success:
print OKGREEN+" "+sub_success,ENDC
print(OKGREEN+" "+sub_success,ENDC)
else:
fail_print("Node " + target_node_name + " exists unexpecetedly. This should be killed with rosnode kill")
if sub_fail:
print FAIL+" "+sub_fail,ENDC
print(FAIL+" "+sub_fail,ENDC)
else:
if needed:
fail_print("Node " + target_node_name + " doesn't exists. This node is NEEDED")
if sub_fail:
print FAIL+" "+sub_fail,ENDC
print(FAIL+" "+sub_fail,ENDC)
else:
success_print("Node " + target_node_name + " doesn't exists")
if sub_success:
print OKGREEN+" "+sub_success,ENDC
print(OKGREEN+" "+sub_success,ENDC)

def check_rosmaster():
try:
Expand All @@ -146,23 +146,23 @@ def check_rosmaster():

def check_vacuum(arm):
topic_name = "/vacuum_gripper/limb/"+arm
print HEADER+BOLD+"=== Check " +topic_name + " ===" +ENDC
print INFO,"Start " + arm + " Vacuum for 5 seconds..."
print(HEADER+BOLD+"=== Check " +topic_name + " ===" +ENDC)
print(INFO,"Start " + arm + " Vacuum for 5 seconds...")
pub = rospy.Publisher(topic_name, Bool, queue_size=1)
pub.publish(Bool(True))
time.sleep(5)

print INFO,"Stop " + arm + " Vacuum"
print(INFO,"Stop " + arm + " Vacuum")
pub.publish(Bool(False))

from baxter_core_msgs.srv import (
ListCameras,
)

def check_cameras():
print HEADER+BOLD+"=== Check CAMERAS ===" +ENDC
print(HEADER+BOLD+"=== Check CAMERAS ===" +ENDC)
ls = rospy.ServiceProxy('cameras/list', ListCameras)
print INFO+" wait for server..." +ENDC
print(INFO+" wait for server..." +ENDC)
try:
rospy.wait_for_service('cameras/list', timeout=5)
except rospy.exceptions.ROSException:
Expand Down
2 changes: 1 addition & 1 deletion jsk_2015_05_baxter_apc/node_scripts/check_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

if __name__ == "__main__":

print HEADER+"= Check Start APC Setup =", ENDC
print(HEADER+"= Check Start APC Setup =", ENDC)

index_print("== Check MASTER ==")
check_rosmaster()
Expand Down
14 changes: 7 additions & 7 deletions jsk_2015_05_baxter_apc/node_scripts/show_setup_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
def ask_yesno():
answer=""
while not ( answer in ["y", "Y", "n", "N"]):
print OKGREEN + "Next? [y/n]", ENDC
print(OKGREEN + "Next? [y/n]", ENDC)
answer = raw_input()
if not ( answer in ["y", "Y", "n", "N"]):
print WARNING + "Please type y/n !", ENDC
print(WARNING + "Please type y/n !", ENDC)
if answer in ["n", "N"]:
fail_print("You canceled....")
exit(-1)

def show_description(show_what_next, sub, command):
index_print("=========================================")
print OKGREEN + show_what_next, ENDC
print OKGREEN + sub, ENDC
print
print command
print
print(OKGREEN + show_what_next, ENDC)
print(OKGREEN + sub, ENDC)
print()
print(command)
print()


if __name__ == "__main__":
Expand Down
4 changes: 2 additions & 2 deletions jsk_apc2015_common/scripts/download_berkeley_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def download_file(url, filename):
f = open(filename, 'wb')
meta = u.info()
file_size = int(meta.getheaders("Content-Length")[0])
print "Downloading: %s (%s MB)" % (filename, file_size/1000000.0)
print("Downloading: %s (%s MB)" % (filename, file_size/1000000.0))

file_size_dl = 0
block_sz = 65536
Expand All @@ -62,7 +62,7 @@ def download_file(url, filename):
f.write(buffer)
status = r"%10d [%3.2f%%]" % (file_size_dl/1000000.0, file_size_dl * 100. / file_size)
status = status + chr(8)*(len(status)+1)
print status,
print(status)
f.close()

def tgz_url(object, type):
Expand Down
Loading

0 comments on commit 6975ab0

Please sign in to comment.