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

Split tsr #367

Merged
merged 10 commits into from
Apr 3, 2017
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
**/cmovetraj.txt

doc
*~
2 changes: 2 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@
<depend>python-rospkg</depend>
<depend>python-yaml</depend>
<depend>python-lxml</depend>
<depend>tsr</depend>
<test_depend>python-nose</test_depend>
<!-- These optional dependencies cause unit tests can fail if missing. -->
<test_depend>cbirrt2</test_depend>
<test_depend>tsr</test_depend>
<test_depend>or_cdchomp</test_depend>
<test_depend>or_ompl</test_depend>
<test_depend>or_parabolicsmoother</test_depend>
Expand Down
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
'prpy.perception',
'prpy.planning',
'prpy.simulation',
'prpy.tsr',
],
package_dir={'': 'src'},
)
Expand Down
6 changes: 3 additions & 3 deletions src/prpy/base/robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@
import functools, logging, openravepy, numpy
from .. import bind, named_config, exceptions, util
from ..clone import Clone, Cloned
from ..tsr.tsrlibrary import TSRLibrary
from tsr.tsrlibrary import TSRLibrary
from ..planning.base import Sequence, Tags
from ..planning.ompl import OMPLSimplifier
from ..planning.retimer import OpenRAVEAffineRetimer, ParabolicRetimer
from ..planning.mac_smoother import MacSmoother
from ..util import SetTrajectoryTags
from ..util import SetTrajectoryTags, GetManipulatorIndex

logger = logging.getLogger(__name__)

Expand All @@ -55,7 +55,7 @@ def __init__(self, robot_name=None):
self.robot_name = robot_name

try:
self.tsrlibrary = TSRLibrary(self, robot_name=robot_name)
self.tsrlibrary = TSRLibrary(self, manipindex=GetManipulatorIndex(self), robot_name=robot_name)
except ValueError as e:
self.tsrlibrary = None
logger.warning('Failed creating TSRLibrary for robot "%s": %s',
Expand Down
2 changes: 1 addition & 1 deletion src/prpy/planning/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
from ik import IKPlanner
from sbpl import SBPLPlanner
from openrave import BiRRTPlanner
from tsr import TSRPlanner
from tsrplanner import TSRPlanner
from workspace import GreedyIKPlanner
from vectorfield import VectorFieldPlanner
6 changes: 3 additions & 3 deletions src/prpy/planning/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
H_from_op_diff,
invert_H,
)
from ..tsr.tsr import (
from tsr.tsr import (
TSR,
TSRChain,
)
Expand Down Expand Up @@ -74,7 +74,7 @@ def CreateTSRChains(cls, robot, direction, distance):
T0_w=numpy.dot(H_world_w, Hw_end),
Tw_e=H_w_ee,
Bw=numpy.zeros((6, 2)),
manip=manip_index))
manipindex=manip_index))
constraint_chain = TSRChain(constrain=True, TSR=TSR(
T0_w=H_world_w,
Tw_e=H_w_ee,
Expand All @@ -85,6 +85,6 @@ def CreateTSRChains(cls, robot, direction, distance):
[-cls.epsilon, cls.epsilon],
[-cls.epsilon, cls.epsilon],
[-cls.epsilon, cls.epsilon]]),
manip=manip_index))
manipindex=manip_index))

return [goal_chain, constraint_chain]
4 changes: 2 additions & 2 deletions src/prpy/planning/cbirrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
DefaultRobotCollisionCheckerFactory,
SimpleRobotCollisionCheckerFactory,
)
from ..tsr import TSR, TSRChain
from tsr import TSR, TSRChain
from ..util import SetTrajectoryTags
from .adapters import PlanToEndEffectorOffsetTSRAdapter
from .base import (
Expand Down Expand Up @@ -104,7 +104,7 @@ def PlanToEndEffectorPose(self, robot, goal_pose, **kw_args):
@return traj output path
"""
manipulator_index = robot.GetActiveManipulatorIndex()
goal_tsr = TSR(T0_w=goal_pose, manip=manipulator_index)
goal_tsr = TSR(T0_w=goal_pose, manipindex=manipulator_index)
tsr_chain = TSRChain(sample_goal=True, TSR=goal_tsr)

kw_args.setdefault('psample', 0.1)
Expand Down
2 changes: 1 addition & 1 deletion src/prpy/planning/chomp.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
from base import (BasePlanner, PlanningError, UnsupportedPlanningError,
ClonedPlanningMethod, Tags)
from prpy.util import VanDerCorputSampleGenerator, SampleTimeGenerator
import prpy.tsr
import tsr

SaveParameters = openravepy.KinBody.SaveParameters.LinkEnable

Expand Down
2 changes: 1 addition & 1 deletion src/prpy/planning/ompl.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
SetTrajectoryTags,
GetManipulatorIndex,
)
from ..tsr.tsr import (
from tsr.tsr import (
TSR,
TSRChain,
)
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/prpy/serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def serialize(obj):
from numpy import ndarray
from openravepy import Environment, KinBody, Robot, Trajectory
from prpy.tsr import TSR, TSRChain
from tsr import TSR, TSRChain

NoneType = type(None)

Expand Down
147 changes: 0 additions & 147 deletions src/prpy/tsr/README.md

This file was deleted.

32 changes: 0 additions & 32 deletions src/prpy/tsr/__init__.py

This file was deleted.

Loading