uwgraphics / relaxed_ik

RelaxedIK Solver
MIT License
195 stars 51 forks source link

Issue with File Writing on Dev - Step 5c #5

Closed supsensei closed 5 years ago

supsensei commented 5 years ago

Hi -

OK. Working through issues on this on. running the NN and runs fine but the file write crashes on the last step. Can't seem to see the issue here:

IOError: [Errno 21] Is a directory: '/home/initial/myws/src/relaxed_ik/src/RelaxedIK/Config/collision_nn_python/'

Ideas?

start_here file config params

`urdf_file_name = 'ur5.urdf' fixed_frame = 'base_link' joint_names = [ ['shoulder_pan_joint', 'shoulder_lift_joint', 'elbow_joint', 'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint'] ] joint_ordering = ['shoulder_pan_joint', 'shoulder_lift_joint', 'elbow_joint', 'wrist_1_joint', 'wrist_2_joint', 'wrist_3_joint'] ee_fixed_joints = ['ee_fixed_joint'] starting_config = [ 3.12769839, -0.03987385, -2.07729916, -1.03981438, -1.58652782, -1.5710159 ]'

'# UR5 from sensor_msgs.msg import JointState def joint_state_define(x): js = JointState() js.name = joint_ordering js.position = tuple(x) return js

default file looks good for UR5

collision_file_name = 'collision_ur5.yaml''

Error: ....Working fine.... [0.48887457] 0.7862703352498891

[0.5682789] 0.5072929357101621

[0.01663378] 2.3967835712600306e-09

[0.39437549] 0.005419666218923598

Traceback (most recent call last): File "/home/initial/myws/src/relaxed_ik/src/preprocessing.py", line 48, in vars = RelaxedIK_vars('relaxedIK',os.path.dirname(file) + '/RelaxedIK/urdfs/' + urdf_file_name,joint_names,ee_fixed_joints, joint_ordering,init_state=starting_config, collision_file=collision_file_name, config_override=True, path_to_src=path_to_src) File "/home/initial/myws/src/relaxed_ik/src/RelaxedIK/GROOVE_RelaxedIK/relaxedIK_vars.py", line 189, in init self.ce = Config_Engine(self.collision_graph, self, path_to_src,collision_nn_file,config_fn=config_file_name, override=config_override) File "/home/initial/myws/src/relaxed_ik/src/RelaxedIK/Utils/config_engine.py", line 23, in init self.joint_order, self.urdf_path, self.collision_file = self.generate_config_file() File "/home/initial/myws/src/relaxed_ik/src/RelaxedIK/Utils/config_engine.py", line 63, in generate_config_file joblib.dump(collision_nn, self.path + self.nn_file_name) File "/home/initial/.local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 501, in dump with open(filename, 'wb') as f: IOError: [Errno 21] Is a directory: '/home/initial/myws/src/relaxed_ik/src/RelaxedIK/Config/collision_nn_python/' [preprocessing-1] process has died [pid 11500, exit code 1, cmd /home/initial/myws/src/relaxed_ik/src/preprocessing.py name:=preprocessing log:=/home/initial/.ros/log/a7764458-1892-11e9-82f4-10e7c6332630/preprocessing-1.log]. log file: /home/initial/.ros/log/a7764458-1892-11e9-82f4-10e7c6332630/preprocessing-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete

supsensei commented 5 years ago

OK. Found a workaround not sure if it really works but appears there is a mistake in joblib.dump(collision_nn, self.path + self.nn_file_name) if I hardcode in

joblib.dump(collision_nn, self.path + ur5_nn)

it works. However, when I run the sample. Nothing moves I see a static UR5 robot.

djrakita commented 5 years ago

Hi! Could you please send the start_here.py you are using? I could try to reproduce the issue on my end.

In general, the dev branch is not quite ready for public use. I'm still testing out many of the new features, and the documentation has not been updated to reflect the changes. I would recommend sticking with the master branch for now - I'll be merging the dev branch to master when it's all ready to go in a few weeks

supsensei commented 5 years ago

OK, you are right, I got the master working after I got it working with dev branch. I think my issues were just having all dependencies. Thank you for your efforts!