trac_ik fails on melodic
Hello list,
After loading a simple urdf in the parameter server using the following launch file:
<launch>
<param name="robot_description"
command="xacro '$(find tf_if_test)/urdf/boot.xacro' " />
<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher">
<param name="use_gui" value="true"/>
</node>
<node name="robot_state_publisher" pkg="robot_state_publisher" type="state_publisher"/>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find tf_if_test/launch/boot.rviz"/>
</launch>
This works fine, but if I try to use trac_ik_python
, but it fails with the following error:
terminate called after throwing an instance of 'ros::TimeNotInitializedException'
what(): Cannot use ros::Time::now() before the first NodeHandle has been created or ros::start() has been called. If this is a standalone app or test that just uses ros::Time and does not communicate over ROS, you may also call ros::Time::init()
Aborted (core dumped)
The code:
#!/usr/bin/env python
import rospy
from trac_ik_python.trac_ik import IK
rospy.init_node('tester', anonymous=True)
ik_solver = IK("l1", "l3")
print 'done'
I thought that init_node did the ros::start() here. Am I doing something wrong?
EDIT: Or is it a problem that there are only 2DOF in this robot?
2nd EDIT: I tried the patch by adding the ros::Timer::init() in the swig-file. That works.
Then I removed that patched version of trac_ik
completely and reverted to the official one. Now the problem does NOT return, It is really reverted, I also rebooted the machine. Weird....
Thanks in advance, Sietse