Can't find the python file named "smart_grasper.py"

In Unit 4, it said the file named smart_grasper.py can be found in the smart_grasping_sandbox package, but I don’t know where to find this file. And when I try to run the code that include get_object_pose and get_tip_pose functions, it can’t show the position information. Could you please help me to solve these two problems?

The result:
[ INFO] [1657635696.338133664]: Loading robot model ‘smart_grasping_sandbox’…
[ INFO] [1657635696.338194240]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ INFO] [1657635696.800747588, 2426.314000000]: Loading robot model ‘smart_grasping_sandbox’…
[ INFO] [1657635696.800807617, 2426.314000000]: No root/virtual joint specified in SRDF. Assuming fixed joint
[ WARN] [1657635697.847461401, 2427.320000000]:
Deprecation warning: Trajectory execution service is deprecated (was replaced by an action).
Replace ‘MoveGroupExecuteService’ with ‘MoveGroupExecuteTrajectoryAction’ in move_group.launch
[ INFO] [1657635697.854249789, 2427.327000000]: Ready to take commands for planning group arm.
[ WARN] [1657635698.385511174, 2427.829000000]:
Deprecation warning: Trajectory execution service is deprecated (was replaced by an action).
Replace ‘MoveGroupExecuteService’ with ‘MoveGroupExecuteTrajectoryAction’ in move_group.launch
[ INFO] [1657635698.395459826, 2427.839000000]: Ready to take commands for planning group hand.
[INFO] [1657635698.751292, 2428.169000]: STARTING CONTROLLERS
[ WARN] [1657635699.334262428, 2428.620000000]:
Deprecation warning: Trajectory execution service is deprecated (was replaced by an action).
Replace ‘MoveGroupExecuteService’ with ‘MoveGroupExecuteTrajectoryAction’ in move_group.launch
[ INFO] [1657635699.341397708, 2428.627000000]: Ready to take commands for planning group arm.
[ WARN] [1657635699.763961237, 2429.021000000]:
Deprecation warning: Trajectory execution service is deprecated (was replaced by an action).
Replace ‘MoveGroupExecuteService’ with ‘MoveGroupExecuteTrajectoryAction’ in move_group.launch
[ INFO] [1657635699.771158068, 2429.029000000]: Ready to take commands for planning group hand.
[INFO] [1657635699.792328, 2429.043000]: STARTING CONTROLLERS
[INFO] [1657635699.906348, 2429.051000]: STARTING CONTROLLERS

You can find that file by “roscding” to the package. Look for it in the src folder.

roscd smart_grasping_sandbox

But it shows that “cannot stat ‘/home/simulations/public_sim_ws/src/all/shadow_robot_smart_grasping_sandbox/smart_grasping_sandbox/smart_grasping_sandbox/smart_grasper.py’: No such file or directory”. How to solve this?

I think the arm can be moved through this python code, but I failed to achieve this goal after programming according to notebook. Could you please share this part of code with me?

Use the follow command to copy the file (assuming you want to copy to your catkin_ws/src folder).

cp /home/simulations/public_sim_ws/src/all/shadow_robot_smart_grasping_sandbox/smart_grasping_sandbox/smart_grasping_sandbox/src/smart_grasping_sandbox/smart_grasper.py ~/catkin_ws/src

Thank you very much!

1 Like