AIS-Bonn / rviz_cinematographer

Easy to use tools to create and edit trajectories for the rviz camera.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Crash when "Move to Current Pose"

ClemensLinnhoff opened this issue · comments

When I click on "Move to Current Pose" right after launching rviz_cinematographer_gui, it crashed with the following error message

rviz: /usr/include/OGRE/OgreVector3.h:197: Ogre::Vector3 Ogre::Vector3::operator/(Ogre::Real) const: Assertion `fScalar != 0.0' failed.

What might be the problem? I am running on Ubuntu 18.04.

Hey, thank you for the crash report :)
Could you tell me how you started the GUI - e.g. using the provided launch file or starting it separately with rosrun or the rqt GUI?
Which ros version do you use?
Does the error happen if you move the camera inside rviz using your mouse first and push the button after?

@ClemensLinnhoff I just tested the GUI on a fresh install of ros and a new workspace, but couldn't replicate the error.
Could you copy the whole output from the terminal including your command to start up the GUI?
This should include the versions of rviz, QT and OGRE.

Thank you for the quick response! I am using ROS melodic on Ubuntu 18.04. Yes, the error also occurs, if I move the camera in rviz first. Here is the complete output:

~$ roslaunch rviz_cinematographer_gui rviz_cinematographer_gui.launch
... logging to /home/clemens/.ros/log/c57ce27e-451a-11ec-a074-34c93daf8edf/roslaunch-sim4-3935.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://sim4:36927/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11
 * /rviz_cinematographer_gui/rviz_cinematographer_camera_poses: [{'position': {'y...
 * /rviz_cinematographer_gui/start_recorder: True

NODES
  /
    rviz (rviz/rviz)
    rviz_cinematographer_gui (rqt_gui/rqt_gui)

ROS_MASTER_URI=http://localhost:11311

process[rviz-1]: started with pid [3957]
process[rviz_cinematographer_gui-2]: started with pid [3958]
[ INFO] [1636898615.819072451]: rviz version 1.13.18
[ INFO] [1636898615.819132046]: compiled against Qt version 5.9.5
[ INFO] [1636898615.819141856]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1636898615.822914169]: Forcing OpenGl version 0.
[ INFO] [1636898616.215187465]: Stereo is NOT SUPPORTED
[ INFO] [1636898616.215235735]: OpenGL device: GeForce GTX 1070 Ti/PCIe/SSE2
[ INFO] [1636898616.215249426]: OpenGl version: 4,6 (GLSL 4,6).
... logging to /home/clemens/.ros/log/c57ce27e-451a-11ec-a074-34c93daf8edf/roslaunch-sim4-4003.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://sim4:36753/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.11

NODES
  /
    video_recorder_nodelet (nodelet/nodelet)

ROS_MASTER_URI=http://localhost:11311

process[video_recorder_nodelet-1]: started with pid [4112]
type is video_recorder/video_recorder_nodelet
rviz: /usr/include/OGRE/OgreVector3.h:197: Ogre::Vector3 Ogre::Vector3::operator/(Ogre::Real) const: Assertion `fScalar != 0.0' failed.
[rviz-1] process has died [pid 3957, exit code -6, cmd /opt/ros/melodic/lib/rviz/rviz -d /home/clemens/adda_ros/src/rviz_cinematographer/rviz_cinematographer_gui/launch/rviz_cinematographer_gui.rviz __name:=rviz __log:=/home/clemens/.ros/log/c57ce27e-451a-11ec-a074-34c93daf8edf/rviz-1.log].
log file: /home/clemens/.ros/log/c57ce27e-451a-11ec-a074-34c93daf8edf/rviz-1*.log

Okay, my best guess so far is that ros_dt is zero on your system.
ros_dt is the duration since the previous call of the update method in ROS time.
Do you know a reason why the ROS time on your system might be stuck?

To verify my guess you could start rviz using gdb.
For that, you just need to:

  • copy paste launch-prefix="xterm -e gdb --args" into the launch file in line 4 inside the node tag - e.g. before name.
    (Here is the link to the tutorial on how to use gdb on ros nodes.)
  • Then you launch the GUI as before.
  • After that a new window opens.
    If not, install xterm using sudo apt install xterm.
  • In the new window, use the command run to start rviz.
  • Push the button causing the error.
  • In the new window, there should be the error message you send me before.
  • Use the command up once to see which method called the method with the failed assertion.
  • Repeat pressing Enter until you see a message like "Cannot go up anymore" or so.
  • Copy the whole output from the new window into a new comment here.

Alternatively you could just print ros_dt and do the steps above if ros_dt is not zero ;)

Is your use_sim_time ros parameter set to True?
If so, do you have any bag file or so providing a /clock topic or a simulated time?

When I set use_sim_time to false, it works. Thank you for the tip!