JuliaPy / JuliaPy/PyCall.jl

How can I use rospy through PyCall directly?

Offen
#1,076 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Julia
Sterne
1.5k
Forks
186
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
julia, python
Bereich
robotics
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.