-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathroport_moveit_py_server.py
More file actions
executable file
·31 lines (27 loc) · 1.01 KB
/
Copy pathroport_moveit_py_server.py
File metadata and controls
executable file
·31 lines (27 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env python
from __future__ import print_function
import rospy
from rotools.moveit.core.server import MoveItServer
from rotools.utility.common import get_param, pretty_print_configs
if __name__ == "__main__":
try:
rospy.init_node("roport_moveit_py_server")
# You only need to modify the config to apply this to new robots
group_names = get_param("~group_names")
assert group_names is not None
ee_links = get_param("~ee_links")
# Will be the base frame of the planning group if not given
ref_frames = get_param("~ref_frames")
configs = {
"robot_description": "robot_description",
"ns": "",
"group_names": group_names,
"ee_links": ee_links,
"ref_frames": ref_frames,
}
pretty_print_configs(configs)
server = MoveItServer(configs)
rospy.loginfo("RoPort: MoveIt python server ready.")
rospy.spin()
except rospy.ROSInterruptException as e:
print(e)