0

I want to use the Pilz Industrial Motion in my robot for construct the trajectories, but in the redme file on pilz_robot_programming, it tell's me that i need a service named /get_speed_override, so how to create it? I do all the tutorials in the website of ROS: ( http://wiki.ros.org/pilz_robots/Tutorials ), it allows me to move the PRBT robot with the RViz and the API Python. These tutorials works fine, so i try with my robot: In Rviz everything looks fine, i can plan and execute PTP and LIN motions, but when i try to use a API, it fails because of this lines:

Waiting for connection to service /prbt/get_speed_override... timeout exceeded while waiting for service /prbt/get_speed_override

So i make a service:

import roslib; 
roslib.load_manifest('test_package') #I create a package to get this service
import rospy
from test_package.srv import GetSpeedOverride #Float between 0 - 1

def SpeedOveride( requisicao ):
    return 1                   #Return 1 just for test
    
rospy.init_node('simple_gui')          #my node
service = rospy.Service( 'simple_gui/get_speed_override', GetSpeedOverride, SpeedOveride )
rospy.spin()

I run i a new terminal and it work for skip that lines, but maybe i create this service in a wrong way because every move fail( but when i run rosservice list its there! ).The error in the terminal:

enter image description here

and this in the API:

pilz_robot_programming.exceptions.RobotMoveFailed: Failure during execution of: Ptp vel_scale: 0.2 acc_scale: 0.2 reference: base_link joint goal: (0.3, 0, 0.45, 0, 0, 0)

I really want to use Pilz because of the MoveC and Blend options for trajectory, but seems a hard way to integrate with another robots, because when i use with the demo, everything is fine, but when i try to use with other robot it fails. But if someone have an ideia to another ways to build it, please, tell me. Obs: I'm using Ros-Noetic e Moveit 1.

Murobot
  • 13
  • 3

1 Answers1

0

To create the service /get_speed_override you can add this line in your launch file:

<node name="fake_speed_override_node" pkg="prbt_hardware_support" type="fake_speed_override_node"/>

or:

rosrun prbt_hardware_support fake_speed_override_node

To move the robot with python:

from pilz_robot_programming import *
__REQUIRED_API_VERSION__ = "1" # That is required
robot  = Robot(version= __REQUIRED_API_VERSION__)
cmdJoint = Ptp(goal=angles, vel_scale=1.0,target_link='you_tool_link',planning_group = "your_move_group_name", reference_frame="base_link")
robot.move(cmdJoint)