0

I have built drake inside docker, but when I run the example:

python pendulum/torque_slider_demo.py

from underactuated repo. the slider doesn't move and the window close button also "max/min buttons work".

I am using this command to start docker:

 xhost +local:root; docker run -i -e DISPLAY \
-e QT_X11_NO_MITSHM=1 -v /tmp/.X11-unix:/tmp/.X11-unix \
-v ~/e/drake:/home/drake \
-p 8888:8888 \
--privileged -t drake \
/bin/bash -c "cd /home/drake && /bin/bash"; xhost -local:root

Questions:

  • How can I make the slider work?
  • How to zoom out/in inside drake visualizer?

hope it's not broad. Thanks in advance.

I.Omar
  • 501
  • 7
  • 19

1 Answers1

1

it's definitely too broad. would be much easier if you split things up. here's a quick attempt.

the slider in that you are mentioning the underactuated repo is a matplotlib gui element. if you're running from our docker, then the slides should work. we've seen issues before on mac, but resolved them. i've asked the underactuated TAs if they've seen it.

the matplotlib interface is not drake_visualizer. drake_visualizer is a separate vtk application for 3D visualization. if you are actually running that, then panning/zooming should be natural, and also documented in the dropdown menus.

don't know what you mean by SDL library.

for examples of using drake from cmake, look here: https://github.com/RobotLocomotion/drake-shambhala

Russ Tedrake
  • 4,703
  • 1
  • 7
  • 10
  • I am using archlinux and I have built drake from ubunto image(didn't pull mit). I can not do any interaction with matplotlib while it's running. zooming is done with 'right click+mouse move' and that wasn't obvious to me" I just figured it now". – I.Omar Apr 08 '18 at 00:15
  • It works for me by adding this at the top: "from pylab import *" and replacing "simulator.StepTo(args.duration)" with "plt.pause(0.1) for i in range(1000000): plt.pause(0.000000001) simulator.StepTo(i)" – I.Omar Apr 08 '18 at 14:21