X1 and X2 basic motion

Create issue
Issue #103 new
Martin Dlouhy created an issue

I am trying to port our code to new simulator and it looks like I cannot get X1 nor X2 robots moving. I used instructions on

https://bitbucket.org/osrf/subt/wiki/tutorials/ExampleSetup

ign launch -v 4 tunnel_circuit_practice.ign worldName:=tunnel_circuit_practice_03 robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_1

and in separate terminal I run

rostopic pub -r 20 /X1/cmd_vel geometry_msgs/Twist -- '[0.5, 0.0, 0.0]' '[0.0, 0.0, 0.0]' 

I can verify in the 3rd terminal that the commands are sent via

rostopic echo /X1/cmd_vel

and they are … but X1 does not move :(. The same hold for X2 … is there something extra necessary in order to “start the simulation”???

Comments (18)

  1. Hector Escobar

    Check your RTI. For me that simulation environment loads but very slow and therefore the vehicle moves slow too so you can’t see it. Try ign launch -v 4 competition.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_1

    instead.

  2. Martin Dlouhy reporter

    Hi Hector,
    thanks for fast response. Sorry for stupid question - what is RTI?

    I am currently completely rebuilding the docker image (with --no-cache) and then I will try.

    thanks

  3. Hector Escobar

    I meant RTF. Real Time Factor. On your lower right corner of the SubT Simulation window, there is a % of how fast the simulation is running. For that specific scenario i get < 1%.

  4. Martin Dlouhy reporter

    so far I see many errors like

    [GUI] [Err] [SceneManager.cc:111] Parent entity with Id: [1] not found. Not adding model visual with ID[186]  and name [X1] to the rendering scene.
    [GUI] [Err] [SceneManager.cc:151] Parent entity with Id: [186] not found. Not adding link: [187]
    
  5. Martin Dlouhy reporter

    The RTF number looks like “random” say from 18 to 45 … so far I see only white image … probably it downloading the scene??

  6. Martin Dlouhy reporter

    I forgot the variables:

    source /opt/ros/melodic/setup.bash
    source ~/subt_ws/install/setup.bash
    

    now it looks better

  7. Martin Dlouhy reporter

    p.s. I clicked on “topic echo” and it just killed that

    7f29bcbf2000-7f29bcbf3000 rw-s 00000000 00:06 544                        /dev/nvidia0
    7f29bcbf3000-7f29bcbf4000 rw-s 00000000 00:06 543                        /dev/nvidiactl
    7f29bcbf4000-7f29bcbf5000 rw-s 00000000 00:06 543                        /dev/nvidiactl
    7f29bcbf5000-7f29bcbf6000 r--s 00000000 08:01 2762652                    /usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/qml/DefaultWindowDecoration.qmlc
    7f29bcbf6000-7f29bcbf8000 r-xs 00001000 08:01 2762652                    /usr/lib/x86_64-linux-gnu/qt5/qml/QtQuick/Dialogs/qml/DefaultWindowDecoration.qmlc
    7f29bcbf8000-7f29bcbff000 r-xp 00000000 00:00 0
    7f29bcbff000-7f29bcc00000 rw-p 00000000 00:00 0
    7f29bcc00000-7f29bcc01000 r-xp 00000000 00:00 0
    7f29bcc01000-7f29bcc02000 ---p 00000000 00:00 0
    7f29bcc02000-7f29bcc08000 rw-p 00000000 00:00 0
    7f29bcc08000-7f29bcc09000 r--p 00027000 08:01 2359472                    /lib/x86_64-linux-gnu/ld-2.27.so
    7f29bcc09000-7f29bcc0a000 rw-p 00028000 08:01 2359472                    /lib/x86_64-linux-gnu/ld-2.27.so
    7f29bcc0a000-7f29bcc0b000 rw-p 00000000 00:00 0
    7ffda29f6000-7ffda31f5000 rw-p 00000000 00:00 0                          [stack]
    7ffda31f8000-7ffda31fb000 r--p 00000000 00:00 0                          [vvar]
    7ffda31fb000-7ffda31fd000 r-xp 00000000 00:00 0                          [vdso]
    ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
    
    
    [NOTE]
    You may have encountered a bug in the Ruby interpreter or extension libraries.
    Bug reports are welcome.
    For details: http://www.ruby-lang.org/bugreport.html
    
    [Dbg] [Manager.cc:295] Received signal[17]
    
  8. Alfredo Bencomo

    Martin, there are several PRs currently being tested that will improve the responsiveness of the commands to move/drive the vehicles. I’ll post back tomorrow with an update.

  9. Chris Fotache

    Same problem here. Launching with:

    ign launch -v 4 competition.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_1

    The RTF is around 6-8%. I launched a simple node to send a forward move… It doesn’t look like it’s moving but if I check the light projection, you can see it has moved after about a minute. Running this in Docker, on Threadripper 1920X with 64Gb RAM and RTX 2080 GPU, so performance shouldn’t be an issue.

  10. Chris Fotache

    Update: The issue comes from the worlds files. The bigger the file, the slower the simulation. “Virtual_stix” works very well. The “Tunnel_circuit_practice_0X” ones are the ones with RTF < 10%.

    Speaking of: The competition scenarios are going to be more like “Virtual_stix”, with the complex layout, or more like the Tunnel_circuit ones which are similar to the qualifying map?

  11. Martin Dlouhy reporter

    Hi Chris,

    thanks for the independent test 🙂 Hopefully this will be fixed/improved soon as it is the very basic and does not have sense to continue adding complex functions until this “no code example” works.

  12. Martin Dlouhy reporter

    I can confirm that if I use the old docker, X2, speed increase to 2m/s in virtual_stix.ign:

    source /opt/ros/melodic/setup.bash
    source ~/subt_ws/install/setup.bash
    ign launch -v 4 virtual_stix.ign robotName1:=X2 robotConfig1:=X2_SENSOR_CONFIG_1
    

    then X2 moves relatively fast … as it used to work in Nov 2018.

  13. Zbyněk Winkler

    I am also seeing RTF around 5% on tunnel_circuit_practice.ign. However when killing it with Ctrl+C I get segfault:

    ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux-gnu]

    -- Machine register context ------------------------------------------------
    RIP: 0x00007fdd48b693db RBP: 0x000055b73515f470 RSP: 0x00007fdd09b51a40
    RAX: 0x00007fdcfc004eb0 RBX: 0x0000000000000000 RCX: 0x0000000000000000
    RDX: 0x000055b735a34f80 RDI: 0x00007fdd492046a0 RSI: 0x00007fdcfc000030
    R8: 0x0000000000000000 R9: 0x00007fdc9dd375c0 R10: 0x00007fdcfc000080
    R11: 0x00007fdcfc000080 R12: 0x0000000000000000 R13: 0x000055b73515f4c0
    R14: 0x00007fdd09b51b00 R15: 0x000055b73515f494 EFL: 0x0000000000010202

    -- C level backtrace information -------------------------------------------
    /usr/lib/x86_64-linux-gnu/libruby-2.5.so.2.5(0x7fdd4e483965) [0x7fdd4e483965]
    /usr/lib/x86_64-linux-gnu/libruby-2.5.so.2.5(0x7fdd4e483b9c) [0x7fdd4e483b9c]
    /usr/lib/x86_64-linux-gnu/libruby-2.5.so.2.5(0x7fdd4e34d884) [0x7fdd4e34d884]
    /usr/lib/x86_64-linux-gnu/libruby-2.5.so.2.5(0x7fdd4e4139a2) [0x7fdd4e4139a2]
    /lib/x86_64-linux-gnu/libc.so.6(0x7fdd4df13f20) [0x7fdd4df13f20]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZNK18QThreadStorageData3getEv+0x3b) [0x7fdd48b693db]
    /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN14QOpenGLContext14currentContextEv+0x2a) [0x7fdd4934464a]
    /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5(_ZN14QOpenGLContext11doneCurrentEv+0x25) [0x7fdd49346855]
    /usr/lib/x86_64-linux-gnu/ign-gazebo-2/plugins/gui/libGzScene3D.so(_ZN8ignition6gazebo2v212RenderThread8ShutDownEv+0x2e) [0x7fdd0f6685be]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN7QObject5eventEP6QEvent+0xe2) [0x7fdd48d79122]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent+0x101) [0x7fdd48d49991]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData+0x1ed) [0x7fdd48d4c11d]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(0x7fdd48da32c3) [0x7fdd48da32c3]
    /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x2e7) [0x7fdd45971417]
    /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(0x7fdd45971650) [0x7fdd45971650]
    /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x2c) [0x7fdd459716dc]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE+0x5f) [0x7fdd48da28ef]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE+0x13a) [0x7fdd48d479ea]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(_ZN7QThread4execEv+0x6a) [0x7fdd48b6622a]
    /usr/lib/x86_64-linux-gnu/libQt5Core.so.5(0x7fdd48b6b16d) [0x7fdd48b6b16d]
    /lib/x86_64-linux-gnu/libpthread.so.0(start_thread+0xdb) [0x7fdd4dcbd6db]
    /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f) [0x7fdd4dff688f] ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

  14. Nate Koenig

    The virtual stix environment is more performant than the tunnel circuit practice environment due to its smaller size. We are turning on levels today, which will enable/disable portions of the tunnel based on the location of vehicles.

    This will improve performance for larger worlds.

  15. Alfredo Bencomo

    Zbyněk,

    Those deadlock messages are now fixed. You can ether install this new Docker image:

              `https://cloud.docker.com/repository/registry-1.docker.io/nkoenig/subt-virtual-testbed`
    

    Or just run the commands below to update your catkin environment.

    sudo apt update && sudo apt upgrade -y
    sudo reboot
    
    cd ~/subt_ws/src/tunnel_circuithg
    pull && hg update tunnel_circuit
    
    source /opt/ros/melodic/setup.bash
    
    rm -rfv ~/.ignition/fuel/fuel.ignitionrobotics.org/openrobotics/models/*
    
    cd ~/subt_ws/
    catkin_make install
    . ~/subt_ws/install/setup.bash
    ign launch -v 4 competition.ign robotName1:=X1 robotConfig1:=X1_SENSOR_CONFIG_2
    
    # Open another terminal and run these commands:
    . /opt/ros/melodic/setup.bash
    . ~/subt_ws/install/setup.bash
    
    roslaunch subt_example teleop.launch
    
  16. Log in to comment