Skip to content
Snippets Groups Projects
Commit fa7546a1 authored by Jan Weber's avatar Jan Weber
Browse files

Error when reinitializing the EGM interface fixed

parent 9cccfcf4
Branches
No related tags found
No related merge requests found
...@@ -131,7 +131,7 @@ def circle(move_group, robot): ...@@ -131,7 +131,7 @@ def circle(move_group, robot):
# switched to motion streaming mode when positions are streamed to the robot afterwards. # switched to motion streaming mode when positions are streamed to the robot afterwards.
jtp = trajectory_msgs.msg.JointTrajectoryPoint() jtp = trajectory_msgs.msg.JointTrajectoryPoint()
jtp.positions = move_group.get_current_joint_values() jtp.positions = move_group.get_current_joint_values()
for _ in range(10): for _ in range(20):
joint_command_publisher.publish(jtp) joint_command_publisher.publish(jtp)
rospy.sleep(0.1) rospy.sleep(0.1)
......
...@@ -261,13 +261,18 @@ int main(int argc, char** argv) ...@@ -261,13 +261,18 @@ int main(int argc, char** argv)
// Create the RWS interface // Create the RWS interface
if(!egm_interface) if(!egm_interface)
{ {
egm_interface = new AbbEgmInterface(); // Create and initialize the EGM interface. If it fails, delate the interface, restart RAPID and try again.
// Initialize the EGM interface. If it fails, restart RAPID and try again.
// After switching on the robot controller, it often happens that the initialization fails. // After switching on the robot controller, it often happens that the initialization fails.
// This can be fixed by restarting RAPID. // This can be fixed by restarting RAPID.
if(!egm_interface->init()) restartRapid(rws_interface); egm_interface = new AbbEgmInterface();
if(!egm_interface->init())
{
delete egm_interface;
restartRapid(rws_interface);
egm_interface = new AbbEgmInterface();
if(!egm_interface->init()) break; if(!egm_interface->init()) break;
} }
}
// Create the Robot interface // Create the Robot interface
if(!robot_interface) if(!robot_interface)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment