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

Cannot publish any kind of message #53

Closed
gstavrinos opened this issue Sep 14, 2018 · 3 comments
Closed

Cannot publish any kind of message #53

gstavrinos opened this issue Sep 14, 2018 · 3 comments

Comments

@gstavrinos
Copy link

gstavrinos commented Sep 14, 2018

While working on a pick and place wrapper for MoveIt, I noticed that my messages were not published. At first I thought that there was a problem with my code or MoveIt, but I created a simple node and still cannot publish a message. My (simple) node is the following:

#!/usr/bin/env julia
using RobotOS
@rosimport geometry_msgs.msg: PoseStamped
rostypegen()
using geometry_msgs.msg
init_node("julia_test")
t = Publisher("/test_topic", PoseStamped, queue_size = 1)
sleep(5)
ps = PoseStamped()
ps.header.stamp = RobotOS.now()

i = 1

while i < 10
    publish(t, ps)
    println("Published"*string(i))
    sleep(1)
    i += 1
end

Any thoughts?

@jdlangs
Copy link
Owner

jdlangs commented Sep 21, 2018

I think your problem is you are calling Julia's sleep which is not allowing rospy to do the message publishing. Try using rossleep instead or calling sleep with a Duration instance.

@gstavrinos
Copy link
Author

Just tried it, but the problem persists. I will wait for the julia-1.0 compatibility update, and update the issue here.

@gstavrinos
Copy link
Author

Latest version of RobotOS with Julia-1.0.1 seems to be working. I can publish messages normally. The issue #57 regarding services, persists.

Thanks for the update, Josh! I am closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants