Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrench not being published #342

Open
danfergo opened this issue Aug 26, 2019 · 1 comment
Open

Wrench not being published #342

danfergo opened this issue Aug 26, 2019 · 1 comment
Labels
kinetic Issues with the refactor in Kinetic more-info-needed

Comments

@danfergo
Copy link

danfergo commented Aug 26, 2019

Hi everyone,

I'm using the kinetic-devel branch with ROS melodic. I'm launching the driver by with

<include file="$(find ur_modern_driver)/launch/ur5_bringup.launch">
        <arg name="robot_ip" value="192.168.1.100"/>
</include>

I was trying to subscribe/echo'ing the /wrench topic but without success. After debugging the rt_publisher.cpp file, I found that the publisher was being called, but the messages weren't being published/received. So, I added "spinOnce" wasn't being called, so I updated the publish method.

Changed,

bool RTPublisher::publish(RTShared& packet)
{
  ... 
  return res && publishTool(packet, time) && publishTransform(packet, time) && publishTemperature(packet, time);
}

To.

bool RTPublisher::publish(RTShared& packet)
{
  ... 
  bool ret = res && publishTool(packet, time) && publishTransform(packet, time) && publishTemperature(packet, time);
  ros::spinOnce();
  return ret;
}

Don't know if this was the best way of solving the issue, but it worked in my case.

@gavanderhoorn
Copy link
Member

Spinning should not be necessary for handling publications, only subscriptions require that in roscpp.

Not saying it didn't appear to resolve your issue, but it would seem like a deviation from how the API is to be used.

We also have a ros::spin() in the main node:

https://github.com/ros-industrial/ur_modern_driver/blob/fd2e38af745b9d471a4f9532be5f39e5d95fe405/src/ros_main.cpp#L245

that should take care of this as well.

Can you provide a little more information on your system, robot controller, versions of relevant components (ie: Polyscope, ur_modern_driver, etc)?

@gavanderhoorn gavanderhoorn added kinetic Issues with the refactor in Kinetic more-info-needed labels Aug 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kinetic Issues with the refactor in Kinetic more-info-needed
Projects
None yet
Development

No branches or pull requests

2 participants