Skip to content

Commit 2b7cafb

Browse files
committed
Get rid of really old stuff
1 parent 508956e commit 2b7cafb

File tree

2 files changed

+0
-249
lines changed

2 files changed

+0
-249
lines changed

src/compas_fab/backends/vrep/coordinator.py

Lines changed: 0 additions & 171 deletions
This file was deleted.

src/compas_fab/ghpython/path_planning.py

Lines changed: 0 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@
77

88
import compas
99
from compas.datastructures import Mesh
10-
from compas.geometry import Frame
1110
from compas.geometry import Transformation
1211
from compas_ghpython.geometry import xform_from_transformation
1312
from compas_rhino.helpers import mesh_from_guid
1413

15-
from compas_fab.backends.vrep.coordinator import SimulationCoordinator
1614
from compas_fab.robots import Configuration
1715

1816
try:
1917
import clr
20-
import ghpythonlib.components as ghcomp
2118
import rhinoscriptsyntax as rs
2219
from Rhino.Geometry import Transform
2320
from Rhino.Geometry import Mesh as RhinoMesh
@@ -190,81 +187,6 @@ def _get_building_member_info(self, gripping_config):
190187
'relative_transform': relative_transform}
191188

192189

193-
class PathPlanner(object):
194-
"""Provides a simple/compact API to call the path planner from Grasshopper."""
195-
196-
@classmethod
197-
def find_path(cls, host='127.0.0.1', port=19997, mode='local', **kwargs):
198-
"""Finds a path for the specified scene description. There is a large number
199-
of parameters that can be passed as `kwargs`. It can run in two modes: *remote* or
200-
*local*. In remote mode, the `host` and `port` parameters correspond to a
201-
simulation coordinator, and in local mode, `host` and `port` correspond to
202-
a V-REP instance.
203-
204-
Args:
205-
host (:obj:`str`): IP address of the service (simulation coordinator in `remote`, V-REP in `local` mode)
206-
port (:obj:`int`): Port of the service.
207-
mode (:obj:`str`): Execution mode, either ``local`` or ``remote``.
208-
kwargs: Keyword arguments.
209-
210-
Returns:
211-
list: list of configurations representing a path.
212-
"""
213-
parser = InputParameterParser()
214-
options = {'robots': []}
215-
active_robot = None
216-
217-
if 'robots' in kwargs:
218-
for i, settings in enumerate(kwargs['robots']):
219-
if 'robot' not in settings:
220-
raise KeyError("'robot' not found at kwargs['robots'][%d]" % i)
221-
222-
robot = {'robot': settings['robot']}
223-
224-
if 'start' in settings:
225-
start = parser.get_config_or_pose(settings['start'])
226-
if start:
227-
robot['start'] = start.to_data()
228-
229-
if 'goal' in settings:
230-
if not active_robot:
231-
active_robot = robot
232-
goal = parser.get_config_or_pose(settings['goal'])
233-
if goal:
234-
robot['goal'] = goal.to_data()
235-
else:
236-
raise ValueError('Multi-move is not (yet) supported. Only one goal can be specified.')
237-
238-
if 'building_member' in settings:
239-
robot['building_member'] = mesh_from_guid(Mesh, settings['building_member']).to_data()
240-
241-
if 'metric_values' in settings:
242-
robot['metric_values'] = map(float, settings['metric_values'].split(','))
243-
244-
if 'joint_limits' in settings:
245-
robot['joint_limits'] = settings['joint_limits']
246-
247-
options['robots'].append(robot)
248-
249-
if 'collision_meshes' in kwargs:
250-
mesh_guids = parser.compact_list(kwargs['collision_meshes'])
251-
options['collision_meshes'] = [mesh_from_guid(Mesh, m).to_data() for m in mesh_guids]
252-
253-
options['debug'] = kwargs.get('debug')
254-
options['trials'] = kwargs.get('trials')
255-
options['shallow_state_search'] = kwargs.get('shallow_state_search')
256-
options['optimize_path_length'] = kwargs.get('optimize_path_length')
257-
options['planner_id'] = kwargs.get('planner_id')
258-
options['resolution'] = kwargs.get('resolution')
259-
260-
if mode == 'remote':
261-
LOG.debug('Running remote path planner executor. Host=%s:%d', host, port)
262-
return SimulationCoordinator.remote_executor(options, host, port)
263-
else:
264-
LOG.debug('Running local path planner executor. Host=%s:%d', host, port)
265-
return SimulationCoordinator.local_executor(options, host, port)
266-
267-
268190
class InputParameterParser(object):
269191
"""Simplifies some tasks related to parsing Grasshopper input parameters
270192
for path planning."""

0 commit comments

Comments
 (0)