PilzDE / pilz_industrial_motion

Industrial trajectory generation for MoveIt!.
https://wiki.ros.org/pilz_industrial_motion
119 stars 37 forks source link

Using the pilz motion planner python API on a custom manipulator #359

Closed gmp-prem closed 1 year ago

gmp-prem commented 1 year ago

Hello,

Commit

Recently, I was trying to use the pilz_industrial_motion on a custom robot using the provided Python API from this example. But After I used the provided demo_program.py python script, the terminal show that there were an error on requesting the service

Software and Versions

Steps to reproduce

How can the issue/bug be reproduced?

  1. Clone this repo and this repo to the same ros workspace as I am using for simulation
  2. Before build the workspace, install all necessary dependencies using this command
    rosdep install --from-paths src --ignore-src -r -y
  3. build the workspace
  4. launch the simulation world with moveit on using this command
    roslaunch motoman_moveit sia5f_basic_moveit_sim.launch
  5. run the pilz motion planner demo code
    rosrun motoman_sia5f_gazebo pilz_planner_control_sim_test.py
  6. The error should show up

Expected behavior

The python script file should be executed and the robot object should be initiated without an error then the robot will move to its pick home position using PTP command via joint values.

Observed behavior

Instead, what I have encountered is that there was an error about waiting for the service to show up.

Logfiles

Executing /home/hayashi/worksp/motoman_sia5f_sim/src/motoman_sia5f_robot/motoman_sia5f_gazebo/scripts/pilz_planner_control_sim_test.py
[INFO] [1672311430.020382, 1660.918000]: Waiting for connection to action server sequence_move_group...
[INFO] [1672311430.252180, 1661.150000]: Waiting for connection to service /prbt/get_speed_override...
Traceback (most recent call last):
  File "/home/hayashi/worksp/motoman_sia5f_sim/src/motoman_sia5f_robot/motoman_sia5f_gazebo/scripts/pilz_planner_control_sim_test.py", line 59, in <module>
    main()
  File "/home/hayashi/worksp/motoman_sia5f_sim/src/motoman_sia5f_robot/motoman_sia5f_gazebo/scripts/pilz_planner_control_sim_test.py", line 21, in main
    robot = Robot(__REQUIRED_API_VERSION__)
  File "/opt/ros/noetic/lib/python3/dist-packages/pilz_robot_programming/robot.py", line 138, in __init__
    self._establish_connections()
  File "/opt/ros/noetic/lib/python3/dist-packages/pilz_robot_programming/robot.py", line 544, in _establish_connections
    rospy.wait_for_service(self._GET_SPEED_OVERRIDE_SRV, self._SERVICE_WAIT_TIMEOUT_S)
  File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 148, in wait_for_service
    raise ROSException("timeout exceeded while waiting for service %s"%resolved_name)
rospy.exceptions.ROSException: timeout exceeded while waiting for service /prbt/get_speed_override