Closed jlee1218 closed 10 months ago
hi @jlee1218
this should work out-of-the-box if the GUI is enabled in mc_rtc configuration.
When you start MCGlobalController
you should see something like:
[info] GUI server enabled
[info] Will serve data on:
[info] - ipc:///tmp/mc_rtc_pub.ipc
[info] - tcp://*:4242
[info] Will handle requests on:
[info] - ipc:///tmp/mc_rtc_rep.ipc
[info] - tcp://*:4343
If you are running the Python program with super-user privilege you might not be able to access the IPC files and mc-rtc-magnum
does not complain about it. Instead you can connect via tcp: mc-rtc-magnum --tcp localhost
Another possible issue might be that you never call the run()
function for some reason (e.g. you are waiting on sensor data before calling run() and the sensor data never comes), in that case the GUI will also appear empty since nothing is published.
I currently have a python program activating the controller using MCGlobalController().run()
Note that you have to create an instance of MCGlobalController
and call run on this instance. e.g.:
gc = mc_control.MCGlobalController()
while active:
# Update sensors via gc interface
gc.run()
# Use gc output to update the system's commands
# Wait for the next iteration
If you are actually calling MCGlobalController().run()
instead then you are basically re-creating everything everytime.
Hi,
Is there a way where I can display my robot simulation in magnum when using my own program to activate my controller?
I currently have a python program activating the controller using MCGlobalController().run(). Is there a method I can use on McGlobalController such that the magnum simulation is activated as well? I see that there's a Ticker class under mc_control, but I cannot call it in python.
Thank you in advance for your help!
From, Jeffrey