JuliaPy / JuliaPy/PyCall.jl

How can I use rospy through PyCall directly?

Aperta
#1,076 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

The code I have can only be able to run the callback once.

```julia
using PyCall

function solve_callback(data)
println("solve_callback.")
end

rospy = pyimport("rospy")
msg = pyimport("geometry_msgs.msg")
WrenchStamped = msg.WrenchStamped

rospy.init_node("solver_interface_sub", disable_signals = false)
println("init_node solver_interface_sub.")

solver_sub = rospy.Subscriber("/solver_input", WrenchStamped, solve_callback, queue_size=1)

if rospy.is_shutdown()
@warn "rospy.is_shutdown()"
end

rospy.spin()

println("stop.")

```
I am aware that RobotOS.jl is one method to accomplish this, but I want to know how can I call rospy directly using PyCall.

Thank you very much.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the PyCall callback and rospy.Subscriber/rospy.spin calls shown in the report, and compare them with RobotOS.jl's handling of ROS callbacks. Reproduce the one-callback behavior using the supplied Julia snippet and investigate the callback lifetime or threading behavior involved. Done means a verified direct-PyCall approach that invokes solve_callback repeatedly, or a clear explanation of why it cannot.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
julia, python
Ambito
robotics
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.