Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MSA] Three small edits #1203

Merged
merged 3 commits into from
May 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black

Expand Down
132 changes: 66 additions & 66 deletions moveit_commander/src/moveit_commander/move_group.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class PlanningSceneInterface(object):
"""

def __init__(self, ns="", synchronous=False, service_timeout=5.0):
""" Create a planning scene interface; it uses both C++ wrapped methods and scene manipulation topics. """
"""Create a planning scene interface; it uses both C++ wrapped methods and scene manipulation topics."""
self._psi = _moveit_planning_scene_interface.PlanningSceneInterface(ns)

self._pub_co = rospy.Publisher(
Expand Down Expand Up @@ -94,31 +94,31 @@ def __submit(self, collision_object, attach=False):
self._pub_co.publish(collision_object)

def add_object(self, collision_object):
""" Add an object to the planning scene """
"""Add an object to the planning scene"""
self.__submit(collision_object, attach=False)

def add_sphere(self, name, pose, radius=1):
""" Add a sphere to the planning scene """
"""Add a sphere to the planning scene"""
co = self.__make_sphere(name, pose, radius)
self.__submit(co, attach=False)

def add_cylinder(self, name, pose, height, radius):
""" Add a cylinder to the planning scene """
"""Add a cylinder to the planning scene"""
co = self.__make_cylinder(name, pose, height, radius)
self.__submit(co, attach=False)

def add_mesh(self, name, pose, filename, size=(1, 1, 1)):
""" Add a mesh to the planning scene """
"""Add a mesh to the planning scene"""
co = self.__make_mesh(name, pose, filename, size)
self.__submit(co, attach=False)

def add_box(self, name, pose, size=(1, 1, 1)):
""" Add a box to the planning scene """
"""Add a box to the planning scene"""
co = self.__make_box(name, pose, size)
self.__submit(co, attach=False)

def add_plane(self, name, pose, normal=(0, 0, 1), offset=0):
""" Add a plane to the planning scene """
"""Add a plane to the planning scene"""
co = CollisionObject()
co.operation = CollisionObject.ADD
co.id = name
Expand All @@ -131,7 +131,7 @@ def add_plane(self, name, pose, normal=(0, 0, 1), offset=0):
self.__submit(co, attach=False)

def attach_object(self, attached_collision_object):
""" Attach an object in the planning scene """
"""Attach an object in the planning scene"""
self.__submit(attached_collision_object, attach=True)

def attach_mesh(
Expand Down Expand Up @@ -162,7 +162,7 @@ def attach_box(self, link, name, pose=None, size=(1, 1, 1), touch_links=[]):
self.__submit(aco, attach=True)

def clear(self):
""" Remove all objects from the planning scene """
"""Remove all objects from the planning scene"""
self.remove_attached_object()
self.remove_world_object()

Expand Down
4 changes: 2 additions & 2 deletions moveit_commander/src/moveit_commander/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ def get_robot_markers(self, *args):
return mrkr

def get_root_link(self):
"""Get the name of the root link of the robot model """
"""Get the name of the root link of the robot model"""
return self._r.get_robot_root_link()

def get_active_joint_names(self, group=None):
Expand Down Expand Up @@ -241,7 +241,7 @@ def get_group_names(self):
return self._r.get_group_names()

def get_current_state(self):
""" Get a RobotState message describing the current state of the robot"""
"""Get a RobotState message describing the current state of the robot"""
s = RobotState()
s.deserialize(self._r.get_current_state())
return s
Expand Down
4 changes: 2 additions & 2 deletions moveit_ros/planning_interface/test/serialize_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@ def test_rejectIntTuple(self):

def test_rejectUnicode(self):
with self.assertRaisesRegexp(Exception, "Python argument types in"):
self.helper.compareEmbeddedZeros(u"kdasd")
self.helper.compareEmbeddedZeros("kdasd")

@unittest.skipIf(py_version_maj == 2, "does not trigger with python 2.7")
def test_rejectUnicodeTuple(self):
with self.assertRaisesRegexp(
RuntimeError, "Underlying python object is not a Bytes/String instance"
):
self.helper.compareVectorTuple((u"kdasd",))
self.helper.compareVectorTuple(("kdasd",))


if __name__ == "__main__":
Expand Down
2 changes: 1 addition & 1 deletion moveit_setup_assistant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,4 @@ The format for the templates is custom to MSA. Let's assume you have a `Template

becomes

<name>r2d2_moveit_config</name>
<name>r2d2_moveit_config</name>
6 changes: 0 additions & 6 deletions moveit_setup_assistant/moveit_setup_assistant/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,6 @@ int main(int argc, char** argv)
auto client = std::make_unique<rviz_common::ros_integration::RosClientAbstraction>();
auto node = client->init(argc, argv, "moveit_setup_assistant", false);

/* TODO:
* Migration Notes:
* ROS 1 MSA had an explicit SIGINT handler (ros::init_options::NoSigintHandler) not replicated here
* ROS 1 MSA also started an ASyncSpinner
*/

// Create Qt Application
QApplication qt_app(argc, argv);
// numeric values should always be POSIX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <QList>
#include <QLabel>
#include <QListWidget>
#include <QListWidget>
#include <QListWidgetItem>
#include <QProgressBar>
#include <QPushButton>
Expand Down