Commit da605c4e authored by Lorenz Halt's avatar Lorenz Halt 🔀
Browse files

fixes

parent 05241735
......@@ -72,11 +72,7 @@ install(TARGETS
catkin_install_python(PROGRAMS
scripts/ilc_server.py
scripts/ilc_client.py
#scripts/lin.py
#scripts/ilc_aux_fctns.py
scripts/wrench_sub.py
scripts/ilc_rosproxy.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
......
......@@ -40,6 +40,12 @@
<member id="robot" reference_id="environment.robot_ur5"/>
<member id="skills">
<!-- Move ptp -->
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_pan_joint, wrist_3_joint, wrist_1_joint, shoulder_lift_joint, wrist_2_joint</member>
<member id="target_joint_state">1.5111723007545828, 1.6092279039888917, -3.141917966357802, 2.9014219134662995, -1.3423824706872163, -3.1797213696262983</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
<member id="target_frame">start_position</member>
......
......@@ -39,6 +39,11 @@
<!-- Use the UR5 for this skill (and for its subskill) -->
<member id="robot" reference_id="environment.robot_ur5"/>
<member id="skills">
<!-- Move ptp -->
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_pan_joint, wrist_3_joint, wrist_1_joint, shoulder_lift_joint, wrist_2_joint</member>
<member id="target_joint_state">1.5111723007545828, 1.6092279039888917, -3.141917966357802, 2.9014219134662995, -1.3423824706872163, -3.1797213696262983</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
......
......@@ -39,6 +39,11 @@
<!-- Use the UR5 for this skill (and for its subskill) -->
<member id="robot" reference_id="environment.robot_ur5"/>
<member id="skills">
<!-- Move ptp -->
<clone prototype="skill_ptp">
<member id="joint_names">elbow_joint, shoulder_pan_joint, wrist_3_joint, wrist_1_joint, shoulder_lift_joint, wrist_2_joint</member>
<member id="target_joint_state">1.5111723007545828, 1.6092279039888917, -3.141917966357802, 2.9014219134662995, -1.3423824706872163, -3.1797213696262983</member>
</clone>
<clone prototype="skill_lin">
<member id="tool_frame">ee_link</member>
......
......@@ -94,7 +94,6 @@ protected:
if (closest_ff != feedforward_.end()) { // fitting tick found
string coordinate_str = coordinate;
std::cout << coordinate_str << '\n';
coordinate_str.erase(0, coordinate_str.find_first_of("/")+1); // delete id from string
auto it = closest_ff->second.find(coordinate_str);
......
......@@ -87,5 +87,9 @@
args="-0.05 0.6 -0.02 1 0 0 0 world target2 100"/>
<!-- <node name="pitasc_http_server" pkg="pitasc_http" type="http_server.py" /> -->
<node name="ilc_rosproxy" pkg="ilc" type="ilc_rosproxy.py" output="screen" >
<rosparam param="T">8</rosparam>
<!-- <rosparam param="folder">/tmp/ilc_folder</rosparam> -->
</node>
</launch>
......@@ -10,15 +10,15 @@ import argparse
class Ilc_serviceproxy:
def __init__(self, args):
def __init__(self):
self.decay_time = None
self.initialize = True
self.T = args.T # sampling time in ms
self.T = rospy.get_param('~T', 8) # sampling time in ms
self.fs = 1.0/(self.T * 0.001) # sampling frequency
self.service = rospy.Service('ilc_service', TriggerILC, self.callback_ilc_calc)
self.folder = args.folder
self.folder = rospy.get_param('~folder', None)
def callback_ilc_calc(self, req):
try:
......@@ -74,12 +74,7 @@ class Ilc_serviceproxy:
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='args')
parser.add_argument('--folder', type=str, required=False, help='Folder to store files in')
parser.add_argument('--T', type=int, default=8, help='Sampling time in ms')
args = parser.parse_args()
rospy.init_node('ilc_server')
Ilc_serviceproxy(args)
rospy.init_node('ilc_proxy')
Ilc_serviceproxy()
print("Ready to serve.")
rospy.spin()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment