surgical-robotics-ai / surgical_robotics_challenge

Interactive Robot Assisted Suturing Simulation
55 stars 43 forks source link

Geomagic teleoperation control not working #61

Closed JackHaoyingZhou closed 1 year ago

JackHaoyingZhou commented 1 year ago

When I set up everything and tried to run the Geomagic teleoperation control, I came across the following error:

Traceback (most recent call last): File "geomagic_multi_psm_control.py", line 194, in psm = PSM(simulation_manager, arm_name, add_joint_errors=False) File "/home/zhyjack/daVinci_simulation/scripts/surgical_robotics_challenge/psm_arm.py", line 83, in init self.base.set_joint_types([JointType.REVOLUTE, JointType.REVOLUTE, JointType.PRISMATIC, JointType.REVOLUTE, AttributeError: 'NoneType' object has no attribute 'set_joint_types'

It seems like that it has some "name" inconsistency in simulation_manager.py . Would you mind double checking it? Thank you!

adnanmunawar commented 1 year ago

Thanks for creating the issue Jack. Quick question, are you running the geomagic_multi_psm_control.py without any arguments? If so, the default arguments try to also launch the control interface for PSM3 which is usually not loaded into the challenge. Can you try launching with the argument python3 geomagic_multi_psm_control.py --three False to check if you still get the same issue?

JackHaoyingZhou commented 1 year ago

Hi Adnan,

Thank you for the information! I have attempted with your suggestion. The original issue disappears. Nevertheless, it returns some new issues shown following. Some named objects are not found and it will not run as expected:

Specified Arguments Namespace(client_name='geomagic_sim_teleop', run_psm_one=True, run_psm_three='False', run_psm_two=True) Found Common Object Namespace as: /ambf/env/ LOADING CONTROLLER FOR psm1 psm1_target_ik NAMED OBJECT NOT FOUND psm1_palm_joint_ik NAMED OBJECT NOT FOUND psm1_target_fk NAMED OBJECT NOT FOUND LOADING CONTROLLER FOR psm2 psm2_target_ik NAMED OBJECT NOT FOUND psm2_palm_joint_ik NAMED OBJECT NOT FOUND psm2_target_fk NAMED OBJECT NOT FOUND Creating Geomagic Device Named: /Geomagic/ From ROS Topics Exception! Goodbye Closing publisher for: /ambf/env/Plane ...

Please let me know if you need any additional information, thanks!

JackHaoyingZhou commented 1 year ago

Hi Adnan,

Hope all is well!

I would like to ask for some hints for solving the above problem. Would you mind giving some guidance on how to solve the "named object not found" issue? Shall I modify the name in the Python script or rename in the ADF file? Thank you and look forward to hearing from you!

adnanmunawar commented 1 year ago

Hi Jack, thanks for following up on the issue. I had been busy with other things so just getting back to it. In the above output, the "NAMED Object NOT FOUND" isn't critical. These are warnings, had these objects been found, they would have been used for some optional features. There is some other exception that is causing your script to terminate. Let me see if I can reproduce the exception with Geomagic.

JackHaoyingZhou commented 1 year ago

Thank you for your patience! The reason is that there is a mixture between this year and last year's repository. Sorry for the inconvenience!