Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Commit 4220e8e

Browse files
authored
various fixes for noetic/python3 (#28)
1 parent 7158725 commit 4220e8e

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
cmake_minimum_required(VERSION 2.8.3)
1+
cmake_minimum_required(VERSION 3.0.2)
22
project(moveit_python)
33

44
find_package(catkin)
55

66
catkin_package()
77
catkin_python_setup()
88

9-
install(
9+
catkin_install_python(
1010
PROGRAMS
11+
scripts/add_box.py
12+
scripts/attach_box.py
1113
scripts/dump_planning_scene.py
1214
scripts/list_objects.py
1315
scripts/load_planning_scene.py

scripts/dump_planning_scene.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright 2014, Michael Ferguson
3+
# Copyright 2014-2021, Michael Ferguson
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without
@@ -57,5 +57,5 @@
5757
print(scene)
5858
print("to %s" % filename)
5959

60-
pickle.dump(scene, open(filename, "w"))
60+
pickle.dump(scene, open(filename, "wb"))
6161

scripts/load_planning_scene.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env python
22

3-
# Copyright 2014, Michael Ferguson
3+
# Copyright 2014-2021, Michael Ferguson
44
# All rights reserved.
55
#
66
# Redistribution and use in source and binary forms, with or without
@@ -43,7 +43,7 @@
4343
else:
4444
filename = "scene.saved"
4545

46-
scene = pickle.load(open(filename, "r"))
46+
scene = pickle.load(open(filename, "rb"))
4747
scene.scene.is_diff = True
4848
pub.publish(scene.scene)
4949
rospy.sleep(5)

src/moveit_python/planning_scene_interface.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2011-2019, Michael Ferguson
1+
# Copyright 2011-2021, Michael Ferguson
22
# All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without
@@ -41,6 +41,11 @@
4141
# https://bugs.launchpad.net/ubuntu/+source/assimp/+bug/1589949
4242
use_pyassimp = False
4343

44+
try:
45+
basestring
46+
except NameError:
47+
basestring = str
48+
4449
from geometry_msgs.msg import Pose, PoseStamped, Point
4550
from moveit_msgs.msg import CollisionObject, AttachedCollisionObject
4651
from moveit_msgs.msg import PlanningScene, PlanningSceneComponents, ObjectColor

0 commit comments

Comments
 (0)