├── .clang-format ├── .clang-tidy ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE.md ├── PULL_REQUEST_TEMPLATE.md ├── dependabot.yml ├── robostack_env.yaml └── workflows │ ├── Dockerfile │ ├── abi.yaml │ ├── ci.yaml │ ├── format.yaml │ ├── prerelease.yaml │ └── robostack.yaml ├── .gitignore ├── .pre-commit-config.yaml ├── CHANGELOG.rst ├── CMakeLists.txt ├── LICENSE ├── README.md ├── cmake └── rviz-extras.cmake.in ├── default.rviz ├── doc ├── add-button.png ├── add-display-dialog.png ├── conf.py ├── display-properties.png ├── display-statuses.png ├── empty-rviz.png ├── focal-point.png ├── grouped-displays.png ├── index.rst ├── selection-box.png ├── selection-properties.png ├── time-panel.png ├── views-panel.png └── youtube.py ├── help └── help.html ├── icons ├── classes │ ├── Axes.png │ ├── Camera.png │ ├── DepthCloud.png │ ├── Displays.svg │ ├── Effort.png │ ├── FluidPressure.png │ ├── FocusCamera.svg │ ├── Grid.png │ ├── GridCells.png │ ├── Group.png │ ├── Help.svg │ ├── Illuminance.png │ ├── Image.png │ ├── Interact.png │ ├── InteractiveMarkers.png │ ├── LaserScan.png │ ├── Map.png │ ├── Marker.png │ ├── MarkerArray.png │ ├── Measure.svg │ ├── MoveCamera.png │ ├── Odometry.png │ ├── Path.png │ ├── PointCloud.png │ ├── PointCloud2.png │ ├── PointStamped.png │ ├── Polygon.png │ ├── Pose.png │ ├── PoseArray.png │ ├── PoseWithCovariance.png │ ├── PublishPoint.svg │ ├── Range.png │ ├── RelativeHumidity.png │ ├── RobotJoint.png │ ├── RobotLink.png │ ├── RobotLinkNoGeom.png │ ├── RobotModel.png │ ├── Select.png │ ├── Selection.png │ ├── SetGoal.png │ ├── SetInitialPose.png │ ├── TF.png │ ├── Temperature.png │ ├── Time.svg │ ├── Tool Properties.png │ ├── Views.svg │ ├── WrenchStamped.png │ └── src │ │ ├── Arrow.xcf │ │ ├── Axes.xcf │ │ ├── GridCells.xcf │ │ ├── InteractiveMarker.xcf │ │ ├── Map.xcf │ │ ├── MarkerArray.xcf │ │ ├── Poly.xcf │ │ ├── Polygon.xcf │ │ ├── PoseArray.xcf │ │ ├── Range.xcf │ │ ├── RobotModel.xcf │ │ └── TF.xcf ├── crosshair.svg ├── cursor.svg ├── default_class_icon.png ├── default_package_icon.png ├── error.png ├── failed_display.png ├── forbidden.svg ├── left_dock.svg ├── menu.svg ├── minus.png ├── move1d.svg ├── move2d.svg ├── move_z.svg ├── moverotate.svg ├── ok.png ├── options.png ├── package.png ├── plus.png ├── right_dock.svg ├── rotate.svg ├── rotate_cam.svg ├── visibility.svg ├── warning.png └── zoom.svg ├── image_src ├── R.blend ├── R.stl ├── RViz.blend ├── RViz.stl ├── Viz.blend ├── Viz.stl ├── icon_kinect.svg ├── rviz_isolated.xcf └── splash_shot.png ├── images ├── splash.png └── splash_overlay.png ├── mainpage.dox ├── ogre_media ├── fonts │ ├── README.md │ ├── liberation-sans │ │ ├── LiberationSans-Bold.ttf │ │ ├── LiberationSans-BoldItalic.ttf │ │ ├── LiberationSans-Italic.ttf │ │ ├── LiberationSans-Regular.ttf │ │ └── SIL Open Font License.txt │ ├── ogre1.10.fontdef │ └── ogre1.9.fontdef ├── materials │ ├── glsl120 │ │ ├── black.frag │ │ ├── depth.frag │ │ ├── depth.vert │ │ ├── depth_circle.frag │ │ ├── flat_color.frag │ │ ├── flat_color_circle.frag │ │ ├── glsl120.program │ │ ├── include │ │ │ ├── circle_impl.frag │ │ │ ├── pack_depth.frag │ │ │ └── pass_depth.vert │ │ ├── indexed_8bit_image.frag │ │ ├── indexed_8bit_image.vert │ │ ├── nogp │ │ │ ├── billboard.vert │ │ │ ├── billboard_tile.vert │ │ │ ├── box.frag │ │ │ ├── box.vert │ │ │ └── nogp.program │ │ ├── pass_color.frag │ │ ├── pass_color_circle.frag │ │ ├── pickcolor.frag │ │ ├── pickcolor_circle.frag │ │ ├── point.vert │ │ ├── shaded_circle.frag │ │ ├── smooth_square.frag │ │ └── test_glsl.sh │ ├── glsl150 │ │ ├── billboard.geom │ │ ├── box.geom │ │ ├── glsl150.program │ │ └── pass_pos_color.vert │ ├── scripts │ │ ├── default_pick_and_depth.material │ │ ├── indexed_8bit_image.material │ │ ├── point_cloud_point.material │ │ └── point_cloud_tile.material │ ├── scripts120 │ │ ├── point_cloud_box.material │ │ ├── point_cloud_flat_square.material │ │ ├── point_cloud_sphere.material │ │ └── point_cloud_square.material │ └── scripts150 │ │ ├── point_cloud_box.material │ │ ├── point_cloud_flat_square.material │ │ ├── point_cloud_sphere.material │ │ └── point_cloud_square.material ├── models │ ├── rviz_cone.mesh │ ├── rviz_cube.mesh │ ├── rviz_cylinder.mesh │ └── rviz_sphere.mesh ├── plugins.cfg └── textures │ └── no_image.png ├── package.xml ├── plugin_description.xml ├── rosdoc.yaml ├── rviz.sublime-project ├── scripts ├── choose-master.py └── system_info.sh ├── setup.py ├── src ├── CMakeLists.txt ├── image_view │ ├── CMakeLists.txt │ ├── image_view.cpp │ ├── image_view.h │ └── main.cpp ├── python_bindings │ ├── CMakeLists.txt │ ├── rviz │ │ └── __init__.py │ ├── shiboken │ │ ├── CMakeLists.txt │ │ ├── global.h │ │ └── typesystem.xml │ └── sip │ │ ├── CMakeLists.txt │ │ ├── bool_property.sip │ │ ├── config.sip │ │ ├── display.sip │ │ ├── display_group.sip │ │ ├── ogre_logging.sip │ │ ├── panel_dock_widget.sip │ │ ├── property.sip │ │ ├── rviz.sip │ │ ├── tool.sip │ │ ├── tool_manager.sip │ │ ├── view_controller.sip │ │ ├── view_manager.sip │ │ ├── visualization_frame.sip │ │ ├── visualization_manager.sip │ │ ├── yaml_config_reader.sip │ │ └── yaml_config_writer.sip ├── rviz │ ├── CMakeLists.txt │ ├── add_display_dialog.cpp │ ├── add_display_dialog.h │ ├── bit_allocator.cpp │ ├── bit_allocator.h │ ├── class_id_recording_factory.h │ ├── config.cpp │ ├── config.h │ ├── default_plugin │ │ ├── CMakeLists.txt │ │ ├── axes_display.cpp │ │ ├── axes_display.h │ │ ├── camera_display.cpp │ │ ├── camera_display.h │ │ ├── covariance_property.cpp │ │ ├── covariance_property.h │ │ ├── covariance_visual.cpp │ │ ├── covariance_visual.h │ │ ├── depth_cloud_display.cpp │ │ ├── depth_cloud_display.h │ │ ├── depth_cloud_mld.cpp │ │ ├── depth_cloud_mld.h │ │ ├── effort_display.cpp │ │ ├── effort_display.h │ │ ├── effort_visual.cpp │ │ ├── effort_visual.h │ │ ├── fluid_pressure_display.cpp │ │ ├── fluid_pressure_display.h │ │ ├── grid_cells_display.cpp │ │ ├── grid_cells_display.h │ │ ├── grid_display.cpp │ │ ├── grid_display.h │ │ ├── illuminance_display.cpp │ │ ├── illuminance_display.h │ │ ├── image_display.cpp │ │ ├── image_display.h │ │ ├── interactive_marker_display.cpp │ │ ├── interactive_marker_display.h │ │ ├── interactive_markers │ │ │ ├── integer_action.cpp │ │ │ ├── integer_action.h │ │ │ ├── interactive_marker.cpp │ │ │ ├── interactive_marker.h │ │ │ ├── interactive_marker_control.cpp │ │ │ └── interactive_marker_control.h │ │ ├── laser_scan_display.cpp │ │ ├── laser_scan_display.h │ │ ├── map_display.cpp │ │ ├── map_display.h │ │ ├── marker_array_display.cpp │ │ ├── marker_array_display.h │ │ ├── marker_display.cpp │ │ ├── marker_display.h │ │ ├── marker_utils.cpp │ │ ├── marker_utils.h │ │ ├── markers │ │ │ ├── arrow_marker.cpp │ │ │ ├── arrow_marker.h │ │ │ ├── line_list_marker.cpp │ │ │ ├── line_list_marker.h │ │ │ ├── line_strip_marker.cpp │ │ │ ├── line_strip_marker.h │ │ │ ├── marker_base.cpp │ │ │ ├── marker_base.h │ │ │ ├── marker_selection_handler.cpp │ │ │ ├── marker_selection_handler.h │ │ │ ├── mesh_resource_marker.cpp │ │ │ ├── mesh_resource_marker.h │ │ │ ├── points_marker.cpp │ │ │ ├── points_marker.h │ │ │ ├── shape_marker.cpp │ │ │ ├── shape_marker.h │ │ │ ├── text_view_facing_marker.cpp │ │ │ ├── text_view_facing_marker.h │ │ │ ├── triangle_list_marker.cpp │ │ │ └── triangle_list_marker.h │ │ ├── odometry_display.cpp │ │ ├── odometry_display.h │ │ ├── path_display.cpp │ │ ├── path_display.h │ │ ├── point_cloud2_display.cpp │ │ ├── point_cloud2_display.h │ │ ├── point_cloud_common.cpp │ │ ├── point_cloud_common.h │ │ ├── point_cloud_display.cpp │ │ ├── point_cloud_display.h │ │ ├── point_cloud_transformer.h │ │ ├── point_cloud_transformers.cpp │ │ ├── point_cloud_transformers.h │ │ ├── point_display.cpp │ │ ├── point_display.h │ │ ├── point_visual.cpp │ │ ├── point_visual.h │ │ ├── polygon_display.cpp │ │ ├── polygon_display.h │ │ ├── pose_array_display.cpp │ │ ├── pose_array_display.h │ │ ├── pose_display.cpp │ │ ├── pose_display.h │ │ ├── pose_with_covariance_display.cpp │ │ ├── pose_with_covariance_display.h │ │ ├── range_display.cpp │ │ ├── range_display.h │ │ ├── relative_humidity_display.cpp │ │ ├── relative_humidity_display.h │ │ ├── robot_model_display.cpp │ │ ├── robot_model_display.h │ │ ├── screw_display.cpp │ │ ├── screw_display.h │ │ ├── screw_visual.cpp │ │ ├── screw_visual.h │ │ ├── temperature_display.cpp │ │ ├── temperature_display.h │ │ ├── tf_display.cpp │ │ ├── tf_display.h │ │ ├── tools │ │ │ ├── focus_tool.cpp │ │ │ ├── focus_tool.h │ │ │ ├── goal_tool.cpp │ │ │ ├── goal_tool.h │ │ │ ├── initial_pose_tool.cpp │ │ │ ├── initial_pose_tool.h │ │ │ ├── interaction_tool.cpp │ │ │ ├── interaction_tool.h │ │ │ ├── measure_tool.cpp │ │ │ ├── measure_tool.h │ │ │ ├── move_tool.cpp │ │ │ ├── move_tool.h │ │ │ ├── point_tool.cpp │ │ │ ├── point_tool.h │ │ │ ├── pose_tool.cpp │ │ │ ├── pose_tool.h │ │ │ ├── selection_tool.cpp │ │ │ └── selection_tool.h │ │ ├── view_controllers │ │ │ ├── fixed_orientation_ortho_view_controller.cpp │ │ │ ├── fixed_orientation_ortho_view_controller.h │ │ │ ├── fps_view_controller.cpp │ │ │ ├── fps_view_controller.h │ │ │ ├── frame_view_controller.cpp │ │ │ ├── frame_view_controller.h │ │ │ ├── orbit_view_controller.cpp │ │ │ ├── orbit_view_controller.h │ │ │ ├── third_person_follower_view_controller.cpp │ │ │ ├── third_person_follower_view_controller.h │ │ │ ├── xy_orbit_view_controller.cpp │ │ │ └── xy_orbit_view_controller.h │ │ └── wrench_visual.h │ ├── display.cpp │ ├── display.h │ ├── display_context.h │ ├── display_factory.cpp │ ├── display_factory.h │ ├── display_group.cpp │ ├── display_group.h │ ├── displays_panel.cpp │ ├── displays_panel.h │ ├── env_config.cpp.in │ ├── env_config.h │ ├── factory.h │ ├── failed_display.cpp │ ├── failed_display.h │ ├── failed_panel.cpp │ ├── failed_panel.h │ ├── failed_tool.cpp │ ├── failed_tool.h │ ├── failed_view_controller.cpp │ ├── failed_view_controller.h │ ├── frame_manager.cpp │ ├── frame_manager.h │ ├── frame_position_tracking_view_controller.cpp │ ├── frame_position_tracking_view_controller.h │ ├── geometry.cpp │ ├── geometry.h │ ├── help_panel.cpp │ ├── help_panel.h │ ├── helpers │ │ ├── color.h │ │ ├── color.i │ │ └── tf_prefix.h │ ├── image │ │ ├── image_display_base.cpp │ │ ├── image_display_base.h │ │ ├── mouse_click.cpp │ │ ├── mouse_click.h │ │ ├── ros_image_texture.cpp │ │ └── ros_image_texture.h │ ├── interactive_object.h │ ├── load_resource.cpp │ ├── load_resource.h │ ├── loading_dialog.cpp │ ├── loading_dialog.h │ ├── main.cpp │ ├── mesh_loader.cpp │ ├── mesh_loader.h │ ├── message_filter_display.h │ ├── msg_conversions.h │ ├── new_object_dialog.cpp │ ├── new_object_dialog.h │ ├── noetic_eol_dialog.cpp │ ├── noetic_eol_dialog.h │ ├── ogre_helpers │ │ ├── apply_visibility_bits.cpp │ │ ├── apply_visibility_bits.h │ │ ├── arrow.cpp │ │ ├── arrow.h │ │ ├── axes.cpp │ │ ├── axes.h │ │ ├── billboard_line.cpp │ │ ├── billboard_line.h │ │ ├── camera_base.cpp │ │ ├── camera_base.h │ │ ├── compatibility.h │ │ ├── custom_parameter_indices.h │ │ ├── grid.cpp │ │ ├── grid.h │ │ ├── initialization.cpp │ │ ├── initialization.h │ │ ├── line.cpp │ │ ├── line.h │ │ ├── mesh_shape.cpp │ │ ├── mesh_shape.h │ │ ├── movable_text.cpp │ │ ├── movable_text.h │ │ ├── object.cpp │ │ ├── object.h │ │ ├── ogre_logging.cpp │ │ ├── ogre_logging.h │ │ ├── ogre_render_queue_clearer.cpp │ │ ├── ogre_render_queue_clearer.h │ │ ├── ogre_vector.h │ │ ├── orbit_camera.cpp │ │ ├── orbit_camera.h │ │ ├── orthographic.cpp │ │ ├── orthographic.h │ │ ├── point_cloud.cpp │ │ ├── point_cloud.h │ │ ├── qt_ogre_render_window.cpp │ │ ├── qt_ogre_render_window.h │ │ ├── render_system.cpp │ │ ├── render_system.h │ │ ├── render_widget.cpp │ │ ├── render_widget.h │ │ ├── shape.cpp │ │ ├── shape.h │ │ └── version_check.h │ ├── panel.cpp │ ├── panel.h │ ├── panel_dock_widget.cpp │ ├── panel_dock_widget.h │ ├── panel_factory.cpp │ ├── panel_factory.h │ ├── pluginlib_factory.h │ ├── preferences.h │ ├── preferences_dialog.cpp │ ├── preferences_dialog.h │ ├── properties │ │ ├── bool_property.cpp │ │ ├── bool_property.h │ │ ├── color_editor.cpp │ │ ├── color_editor.h │ │ ├── color_property.cpp │ │ ├── color_property.h │ │ ├── combo_box.cpp │ │ ├── combo_box.h │ │ ├── display_group_visibility_property.cpp │ │ ├── display_group_visibility_property.h │ │ ├── display_visibility_property.cpp │ │ ├── display_visibility_property.h │ │ ├── editable_combo_box.cpp │ │ ├── editable_combo_box.h │ │ ├── editable_enum_property.cpp │ │ ├── editable_enum_property.h │ │ ├── enum_property.cpp │ │ ├── enum_property.h │ │ ├── float_edit.cpp │ │ ├── float_edit.h │ │ ├── float_property.cpp │ │ ├── float_property.h │ │ ├── int_property.cpp │ │ ├── int_property.h │ │ ├── line_edit_with_button.cpp │ │ ├── line_edit_with_button.h │ │ ├── parse_color.cpp │ │ ├── parse_color.h │ │ ├── property.cpp │ │ ├── property.h │ │ ├── property_tree_delegate.cpp │ │ ├── property_tree_delegate.h │ │ ├── property_tree_model.cpp │ │ ├── property_tree_model.h │ │ ├── property_tree_widget.cpp │ │ ├── property_tree_widget.h │ │ ├── property_tree_with_help.cpp │ │ ├── property_tree_with_help.h │ │ ├── quaternion_property.cpp │ │ ├── quaternion_property.h │ │ ├── ros_topic_property.cpp │ │ ├── ros_topic_property.h │ │ ├── splitter_handle.cpp │ │ ├── splitter_handle.h │ │ ├── status_list.cpp │ │ ├── status_list.h │ │ ├── status_property.cpp │ │ ├── status_property.h │ │ ├── string_property.cpp │ │ ├── string_property.h │ │ ├── tf_frame_property.cpp │ │ ├── tf_frame_property.h │ │ ├── vector_property.cpp │ │ └── vector_property.h │ ├── render_panel.cpp │ ├── render_panel.h │ ├── robot │ │ ├── link_updater.h │ │ ├── robot.cpp │ │ ├── robot.h │ │ ├── robot_joint.cpp │ │ ├── robot_joint.h │ │ ├── robot_link.cpp │ │ ├── robot_link.h │ │ ├── tf_link_updater.cpp │ │ └── tf_link_updater.h │ ├── scaled_image_widget.cpp │ ├── scaled_image_widget.h │ ├── screenshot_dialog.cpp │ ├── screenshot_dialog.h │ ├── selection │ │ ├── forwards.h │ │ ├── selection_handler.cpp │ │ ├── selection_handler.h │ │ ├── selection_manager.cpp │ │ └── selection_manager.h │ ├── selection_panel.cpp │ ├── selection_panel.h │ ├── splash_screen.cpp │ ├── splash_screen.h │ ├── time_panel.cpp │ ├── time_panel.h │ ├── tool.cpp │ ├── tool.h │ ├── tool_manager.cpp │ ├── tool_manager.h │ ├── tool_properties_panel.cpp │ ├── tool_properties_panel.h │ ├── uniform_string_stream.cpp │ ├── uniform_string_stream.h │ ├── validate_floats.h │ ├── validate_quaternions.h │ ├── view_controller.cpp │ ├── view_controller.h │ ├── view_manager.cpp │ ├── view_manager.h │ ├── viewport_mouse_event.h │ ├── views_panel.cpp │ ├── views_panel.h │ ├── visualization_frame.cpp │ ├── visualization_frame.h │ ├── visualization_manager.cpp │ ├── visualization_manager.h │ ├── visualizer_app.cpp │ ├── visualizer_app.h │ ├── wait_for_master_dialog.cpp │ ├── wait_for_master_dialog.h │ ├── widget_geometry_change_detector.cpp │ ├── widget_geometry_change_detector.h │ ├── window_manager_interface.h │ ├── windows_compat.h │ ├── yaml_config_reader.cpp │ ├── yaml_config_reader.h │ ├── yaml_config_writer.cpp │ └── yaml_config_writer.h └── test │ ├── CMakeLists.txt │ ├── arrow_marker_test.py │ ├── big-font.style │ ├── big-menus.style │ ├── cloud_test.cpp │ ├── color_editor_test.cpp │ ├── config_sample.py │ ├── config_test.cpp │ ├── connect_test.cpp │ ├── connect_test.h │ ├── cube-and-cube-list-marker.yaml │ ├── cycling_frame.py │ ├── display_test.cpp │ ├── display_test.test │ ├── embedded_materials_with_stl.yaml │ ├── image_test.cpp │ ├── interactive_marker_test.cpp │ ├── kitchen-mesh-marker.yaml │ ├── line_edit_with_button_test.cpp │ ├── map_test.py │ ├── marker_array_test.py │ ├── marker_test.cpp │ ├── mesh_marker_test.cpp │ ├── meshes │ ├── 16bit_vs_32bit_should_fail.stl │ ├── F10.stl │ ├── F2.stl │ ├── F3.stl │ ├── F4.stl │ ├── README │ ├── ax12_box.stl │ ├── base_color.tif │ ├── base_normals.tif │ ├── finger.stl │ ├── frame.dae │ ├── invalid.stl │ ├── invalid_end_tags.stl │ ├── invalid_extra.stl │ ├── invalid_short.stl │ ├── kitchen │ │ ├── doc.kml │ │ ├── images │ │ │ ├── texture0.jpg │ │ │ ├── texture1.jpg │ │ │ ├── texture2.jpg │ │ │ ├── texture3.jpg │ │ │ ├── texture4.jpg │ │ │ ├── texture5.jpg │ │ │ └── texture6.jpg │ │ ├── models │ │ │ └── dada.dae │ │ └── textures.txt │ ├── pr2-base.dae │ ├── valid.stl │ └── valid_ascii.stl │ ├── mock_context.cpp │ ├── mock_context.h │ ├── mock_display.cpp │ ├── mock_display.h │ ├── mock_display_factory.cpp │ ├── mock_display_factory.h │ ├── mock_property_change_receiver.cpp │ ├── mock_property_change_receiver.h │ ├── new_display_dialog_test.cpp │ ├── posearray.py │ ├── property_test.cpp │ ├── publish_test_map.py │ ├── python_sample.py │ ├── render_panel_test.cpp │ ├── render_points_test.cpp │ ├── render_points_test.h │ ├── ros_spinner.cpp │ ├── ros_spinner.h │ ├── rviz_logo.rviz │ ├── rviz_logo_marker.cpp │ ├── sample_file.yaml │ ├── send_bad_pc2.py │ ├── send_covariance_msgs.py │ ├── send_efforts.py │ ├── send_grid_cells_node.cpp │ ├── send_images.cpp │ ├── send_lots_of_points_node.cpp │ ├── send_lots_of_tf.py │ ├── send_odometry.py │ ├── send_path.py │ ├── send_point.py │ ├── send_point_cloud_2.cpp │ ├── send_point_cloud_2.py │ ├── send_polygon.py │ ├── send_pose.py │ ├── send_range.py │ ├── send_tf.py │ ├── send_tf_timing.py │ ├── send_two_clouds.py │ ├── send_wrench.py │ ├── stl_loader_test.cpp │ ├── test_in.vcg │ ├── tf_sync_display.rviz │ ├── tf_sync_frame.rviz │ ├── triangle_list_marker.yaml │ ├── turtlebot-arm-mesh-marker-array.yaml │ ├── two_render_widgets.cpp │ └── uniform_string_stream_test.cpp └── srv └── SendFilePath.srv /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | BasedOnStyle: Google 3 | ColumnLimit: 105 4 | MaxEmptyLinesToKeep: 2 5 | SortIncludes: false 6 | 7 | Standard: Auto 8 | IndentWidth: 2 9 | TabWidth: 2 10 | UseTab: Never 11 | AccessModifierOffset: -2 12 | ConstructorInitializerIndentWidth: 2 13 | NamespaceIndentation: None 14 | ContinuationIndentWidth: 4 15 | IndentCaseLabels: false 16 | IndentFunctionDeclarationAfterType: false 17 | 18 | AlignEscapedNewlinesLeft: false 19 | AlignTrailingComments: true 20 | 21 | AllowAllParametersOfDeclarationOnNextLine: false 22 | 23 | AllowShortBlocksOnASingleLine: true 24 | AllowShortIfStatementsOnASingleLine: false 25 | AllowShortLoopsOnASingleLine: false 26 | AllowShortFunctionsOnASingleLine: None 27 | AllowShortCaseLabelsOnASingleLine: false 28 | 29 | AlwaysBreakTemplateDeclarations: true 30 | AlwaysBreakBeforeMultilineStrings: false 31 | BreakBeforeBinaryOperators: false 32 | BreakBeforeTernaryOperators: false 33 | BreakConstructorInitializersBeforeComma: true 34 | 35 | BinPackParameters: false 36 | ConstructorInitializerAllOnOneLineOrOnePerLine: true 37 | DerivePointerAlignment: false 38 | PointerAlignment: Left 39 | 40 | PenaltyExcessCharacter: 50 41 | PenaltyBreakBeforeFirstCallParameter: 30 42 | PenaltyBreakComment: 1000 43 | PenaltyBreakFirstLessLess: 10 44 | PenaltyBreakString: 100 45 | PenaltyReturnTypeOnItsOwnLine: 50 46 | 47 | SpacesBeforeTrailingComments: 1 48 | SpacesInParentheses: false 49 | SpacesInAngles: false 50 | SpaceInEmptyParentheses: false 51 | SpacesInCStyleCastParentheses: false 52 | SpaceAfterCStyleCast: false 53 | SpaceAfterControlStatementKeyword: true 54 | SpaceBeforeAssignmentOperators: true 55 | 56 | # Configure each individual brace in BraceWrapping 57 | BreakBeforeBraces: Custom 58 | 59 | # Control of individual brace wrapping cases 60 | BraceWrapping: 61 | AfterCaseLabel: true 62 | AfterClass: true 63 | AfterControlStatement: true 64 | AfterEnum: true 65 | AfterFunction: true 66 | AfterNamespace: true 67 | AfterStruct: true 68 | AfterUnion: true 69 | BeforeCatch: true 70 | BeforeElse: true 71 | IndentBraces: false 72 | -------------------------------------------------------------------------------- /.clang-tidy: -------------------------------------------------------------------------------- 1 | --- 2 | Checks: 'performance-*, 3 | llvm-namespace-comment, 4 | modernize-redundant-void-arg, 5 | modernize-use-nullptr, 6 | modernize-use-default, 7 | modernize-use-override, 8 | readability-named-parameter, 9 | readability-redundant-smartptr-get, 10 | readability-redundant-string-cstr, 11 | readability-simplify-boolean-expr, 12 | readability-container-size-empty, 13 | ' 14 | HeaderFilterRegex: '' 15 | AnalyzeTemporaryDtors: false 16 | CheckOptions: 17 | - key: llvm-namespace-comment.ShortNamespaceLines 18 | value: '10' 19 | - key: llvm-namespace-comment.SpacesBeforeComments 20 | value: '2' 21 | - key: readability-braces-around-statements.ShortStatementLines 22 | value: '2' 23 | # type names 24 | - key: readability-identifier-naming.ClassCase 25 | value: CamelCase 26 | - key: readability-identifier-naming.EnumCase 27 | value: CamelCase 28 | - key: readability-identifier-naming.UnionCase 29 | value: CamelCase 30 | # method names 31 | - key: readability-identifier-naming.MethodCase 32 | value: camelBack 33 | # variable names 34 | - key: readability-identifier-naming.VariableCase 35 | value: lower_case 36 | - key: readability-identifier-naming.ClassMemberSuffix 37 | value: '_' 38 | # const static or global variables are UPPER_CASE 39 | - key: readability-identifier-naming.EnumConstantCase 40 | value: UPPER_CASE 41 | - key: readability-identifier-naming.StaticConstantCase 42 | value: UPPER_CASE 43 | - key: readability-identifier-naming.ClassConstantCase 44 | value: UPPER_CASE 45 | - key: readability-identifier-naming.GlobalVariableCase 46 | value: UPPER_CASE 47 | ... 48 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: rhaschke 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 13 | 14 | Describe your issue here and explain how to reproduce it. 15 | 16 | ### Your environment 17 | * OS Version: e.g. Ubuntu 18.04 18 | * ROS Distro: [Kinetic | Melodic | Noetic] 19 | * RViz, Qt, OGRE, OpenGl version as printed by rviz: 20 | ``` 21 | paste your console output here 22 | ``` 23 | * If source build, which git commit? 24 | * System locale, i.e. the output of `echo "$LANG $LC_NUMERIC"`: 25 | Before reporting a rendering issue, try running RViz with `LANG=C rviz`! 26 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 6 | 7 | ### Description 8 | 9 | Add your description here 10 | 11 | ### Checklist 12 | 13 | - [ ] If you are addressing rendering issues, please provide: 14 | - [ ] Images of both, broken and fixed renderings. 15 | - [ ] Source code to reproduce the issue, e.g. a `YAML` or `rosbag` file with a `MarkerArray` msg. 16 | - [ ] If you are changing GUI, please include screenshots showing how things looked *before* and *after*. 17 | - [ ] Choose the proper target branch: latest release branch, for non-ABI-breaking changes, *future* release branch otherwise. 18 | Due to the lack of active maintainers, we cannot provide support for older release branches anymore. 19 | - [ ] Did you change how RViz works? Added new functionality? Do not forget to update the tutorials and/or documentation on the [ROS wiki](http://wiki.ros.org/rviz) 20 | - [ ] While waiting for someone to review your request, please consider reviewing [another open pull request](https://github.com/ros-visualization/rviz/pulls) to support the maintainers of RViz. Refer to the [RViz Wiki](https://github.com/ros-visualization/rviz/wiki/Maintainer-Guide#reviewing-pull-requests) for reviewing guidelines. 21 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | # Maintain dependencies for GitHub Actions 4 | - package-ecosystem: "github-actions" 5 | directory: "/" 6 | schedule: 7 | interval: "weekly" 8 | -------------------------------------------------------------------------------- /.github/robostack_env.yaml: -------------------------------------------------------------------------------- 1 | name: test 2 | channels: 3 | - robostack 4 | - conda-forge 5 | dependencies: 6 | - compilers 7 | - ninja 8 | - cmake 9 | - catkin_pkg 10 | - pkg-config 11 | - rosdep 12 | - rosdistro 13 | - ros-distro-mutex 0.1 noetic 14 | - ros-noetic-catkin 15 | - ros-noetic-ros-environment 16 | - openssl 1.1.1* 17 | # we need the static library of this build 18 | - tinyxml2 9.0.0 *_1 19 | -------------------------------------------------------------------------------- /.github/workflows/Dockerfile: -------------------------------------------------------------------------------- 1 | # rhaschke/ici:rviz-noetic-ros 2 | # Image used for GHA CI builds 3 | # build with: 4 | # - DOCKER_BUILDKIT=1 docker build --tag rhaschke/ici:rviz-noetic-ros - < .github/workflows/Dockerfile 5 | # - DOCKER_BUILDKIT=1 docker build --tag rhaschke/ici:rviz-jammy-ros --build-arg="BASE=ubiagni/ros:jammy-ros-base" --build-arg="ROS_DISTRO=one" - < .github/workflows/Dockerfile 6 | 7 | ARG ROS_DISTRO=noetic 8 | ARG BASE=ros:noetic-ros-base 9 | FROM ${BASE} 10 | 11 | ENV TERM xterm 12 | 13 | # Commands are combined in single RUN statement with "apt/lists" folder removal to reduce image size 14 | # https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#minimize-the-number-of-layers 15 | RUN --mount=type=bind,target=/tmp/rviz \ 16 | # Update apt package list as previous containers clear the cache 17 | apt-get -q update && \ 18 | apt-get -q -y dist-upgrade && \ 19 | # 20 | # Install some base dependencies 21 | apt-get -q install --no-install-recommends -y \ 22 | # Some basic requirements 23 | wget git sudo \ 24 | # Qt6 packages for Jammy 25 | $(test "$ROS_DISTRO" = "one" && echo "qt6-base-dev qt6-base-dev-tools libqt6opengl6-dev") \ 26 | # Preferred build tools 27 | clang clang-format-12 clang-tidy clang-tools ccache && \ 28 | # 29 | # Download all dependencies for rviz 30 | rosdep update $(test "${ROS_DISTRO}" = "melodic" && echo "--include-eol-distros") && \ 31 | DEBIAN_FRONTEND=noninteractive \ 32 | rosdep install -y --from-paths /tmp/rviz --ignore-src --rosdistro ${ROS_DISTRO} --as-root=apt:false && \ 33 | # 34 | # Clear apt-cache to reduce image size 35 | rm -rf /var/lib/apt/lists/* && \ 36 | # Globally disable git security 37 | # https://github.blog/2022-04-12-git-security-vulnerability-announced 38 | git config --global --add safe.directory "*" 39 | -------------------------------------------------------------------------------- /.github/workflows/abi.yaml: -------------------------------------------------------------------------------- 1 | # This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). 2 | # For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) 3 | 4 | name: ABI 5 | 6 | on: 7 | workflow_dispatch: 8 | pull_request: 9 | push: 10 | 11 | jobs: 12 | default: 13 | strategy: 14 | matrix: 15 | distro: [noetic] 16 | 17 | env: 18 | UPSTREAM_WORKSPACE: github:rhaschke/python_qt_binding#silent-external-warnings 19 | CCACHE_DIR: ${{ github.workspace }}/.ccache 20 | BASEDIR: /home/runner/work 21 | DOCKER_IMAGE: rhaschke/ici:rviz-${{ matrix.distro }}-${{ matrix.repo || 'ros' }} 22 | CACHE_PREFIX: ${{ matrix.distro }} 23 | ABICHECK_URL: github:ros-visualization/rviz#1.14.24 24 | GHA_CACHE_SAVE: always 25 | 26 | name: "check" 27 | runs-on: ubuntu-latest 28 | steps: 29 | - uses: actions/checkout@v4 30 | 31 | - name: Cache ccache 32 | uses: rhaschke/cache@main 33 | with: 34 | path: ${{ env.CCACHE_DIR }} 35 | key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} 36 | restore-keys: | 37 | ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} 38 | ccache-${{ env.CACHE_PREFIX }} 39 | 40 | - name: Cache ABI workspace 41 | uses: rhaschke/cache@main 42 | with: 43 | path: ${{ env.BASEDIR }}/base_ws 44 | key: base_ws-${{ env.CACHE_PREFIX }}-${{ env.ABICHECK_URL }} 45 | restore-keys: | 46 | base_ws-${{ env.CACHE_PREFIX }} 47 | 48 | - name: industrial_ci 49 | uses: rhaschke/industrial_ci@master 50 | env: ${{ matrix.env || env }} 51 | 52 | - name: Upload test results (on failure) 53 | uses: actions/upload-artifact@v4 54 | if: failure() 55 | with: 56 | name: abi-check 57 | path: ${{ env.BASEDIR }}/abicheck/** 58 | -------------------------------------------------------------------------------- /.github/workflows/format.yaml: -------------------------------------------------------------------------------- 1 | # This is a format job. Pre-commit has a first-party GitHub action, so we use 2 | # that: https://github.com/pre-commit/action 3 | 4 | name: Format 5 | 6 | on: 7 | workflow_dispatch: 8 | pull_request: 9 | push: 10 | 11 | jobs: 12 | pre-commit: 13 | name: pre-commit 14 | runs-on: ubuntu-20.04 15 | steps: 16 | - uses: actions/checkout@v4 17 | - name: Install clang-format-12 18 | run: sudo apt-get install clang-format-12 19 | - uses: rhaschke/install-catkin_lint-action@v1.0 20 | with: 21 | distro: noetic 22 | - uses: pre-commit/action@v3.0.1 23 | -------------------------------------------------------------------------------- /.github/workflows/prerelease.yaml: -------------------------------------------------------------------------------- 1 | # This config uses industrial_ci (https://github.com/ros-industrial/industrial_ci.git). 2 | # For troubleshooting, see readme (https://github.com/ros-industrial/industrial_ci/blob/master/README.rst) 3 | 4 | name: pre-release 5 | 6 | on: [workflow_dispatch] 7 | 8 | jobs: 9 | default: 10 | strategy: 11 | matrix: 12 | distro: [noetic] 13 | 14 | env: 15 | ROS_DISTRO: ${{ matrix.distro }} 16 | PRERELEASE: true 17 | BASEDIR: /home/runner/work 18 | CCACHE_DIR: ${{ github.workspace }}/.ccache 19 | CACHE_PREFIX: "${{ matrix.env.IMAGE }}${{ matrix.env.CCOV && '-ccov' || '' }}" 20 | 21 | name: "${{ matrix.distro }}" 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@v4 25 | - name: Cache ccache 26 | uses: rhaschke/cache@main 27 | with: 28 | path: ${{ env.CCACHE_DIR }} 29 | key: ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }}-${{ github.run_id }} 30 | restore-keys: | 31 | ccache-${{ env.CACHE_PREFIX }}-${{ github.sha }} 32 | ccache-${{ env.CACHE_PREFIX }} 33 | env: 34 | GHA_CACHE_SAVE: always 35 | 36 | - name: industrial_ci 37 | uses: rhaschke/industrial_ci@master 38 | 39 | - name: Upload test artifacts (on failure) 40 | uses: actions/upload-artifact@v4 41 | if: failure() 42 | with: 43 | name: test-results 44 | path: ${{ env.BASEDIR }}/target_ws/**/test_results/**/*.xml 45 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.pyc 3 | bin 4 | build 5 | lib 6 | *.sublime-workspace 7 | -------------------------------------------------------------------------------- /.pre-commit-config.yaml: -------------------------------------------------------------------------------- 1 | # To use: 2 | # 3 | # pre-commit run -a 4 | # 5 | # Or: 6 | # 7 | # pre-commit install # (runs every time you commit in git) 8 | # 9 | # To update this file: 10 | # 11 | # pre-commit autoupdate 12 | # 13 | # See https://github.com/pre-commit/pre-commit 14 | 15 | repos: 16 | # Standard hooks 17 | - repo: https://github.com/pre-commit/pre-commit-hooks 18 | rev: v4.6.0 19 | hooks: 20 | - id: check-added-large-files 21 | - id: check-case-conflict 22 | - id: check-merge-conflict 23 | - id: check-symlinks 24 | - id: check-yaml 25 | - id: debug-statements 26 | - id: end-of-file-fixer 27 | - id: mixed-line-ending 28 | - id: trailing-whitespace 29 | 30 | - repo: https://github.com/psf/black 31 | rev: 24.4.2 32 | hooks: 33 | - id: black 34 | 35 | - repo: https://github.com/PyCQA/pylint 36 | rev: v3.2.0 37 | hooks: [] 38 | 39 | - repo: local 40 | hooks: 41 | - id: clang-format 42 | name: clang-format 43 | description: Format files with ClangFormat. 44 | entry: clang-format-12 45 | language: system 46 | files: \.(c|cc|cxx|cpp|h|hpp|hxx|ih|ispc|ipp)$ 47 | args: ["-fallback-style=none", "-i"] 48 | - id: catkin_lint 49 | name: catkin_lint 50 | description: Check package.xml and cmake files 51 | entry: catkin_lint . 52 | language: system 53 | always_run: true 54 | pass_filenames: false 55 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright Robert Haschke, Bielefeld University 2 | 3 | Redistribution and use in source and binary forms, with or without 4 | modification, are permitted provided that the following conditions are met: 5 | 6 | 1. Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | 9 | 2. Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | 13 | 3. Neither the name of the copyright holder nor the names of its 14 | contributors may be used to endorse or promote products derived from 15 | this software without specific prior written permission. 16 | 17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /cmake/rviz-extras.cmake.in: -------------------------------------------------------------------------------- 1 | # Export the Qt version used by rviz. 2 | set(rviz_QT_VERSION @rviz_QT_VERSION@) 3 | 4 | # Set the rviz_DEFAULT_PLUGIN_LIBRARIES variable. 5 | # If the target exists, then this file was included during a cmake invocation 6 | # that is shared with rviz's cmake, e.g. when building with catkin_make. 7 | if(TARGET @rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME@) 8 | # So just set it to the target name. 9 | set(rviz_DEFAULT_PLUGIN_LIBRARIES @rviz_DEFAULT_PLUGIN_LIBRARY_TARGET_NAME@) 10 | else() 11 | # Otherwise rviz was built separately and this was sourced from a devel space or install space. 12 | # If the location file doesn't exist at this point it is an error. 13 | if(EXISTS "${rviz_DIR}/default_plugin_location.cmake") 14 | # The file being included is generated by src/rviz/default_plugin/CMakeLists.txt 15 | include("${rviz_DIR}/default_plugin_location.cmake") 16 | set(rviz_DEFAULT_PLUGIN_LIBRARIES 17 | "${rviz_DIR}/../../../@CATKIN_PACKAGE_LIB_DESTINATION@/${rviz_DEFAULT_PLUGIN_FILE_NAME}") 18 | else() 19 | message(FATAL_ERROR "the default_plugin_location.cmake file was not found and is required") 20 | endif() 21 | endif() 22 | -------------------------------------------------------------------------------- /doc/add-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/add-button.png -------------------------------------------------------------------------------- /doc/add-display-dialog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/add-display-dialog.png -------------------------------------------------------------------------------- /doc/display-properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/display-properties.png -------------------------------------------------------------------------------- /doc/display-statuses.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/display-statuses.png -------------------------------------------------------------------------------- /doc/empty-rviz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/empty-rviz.png -------------------------------------------------------------------------------- /doc/focal-point.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/focal-point.png -------------------------------------------------------------------------------- /doc/grouped-displays.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/grouped-displays.png -------------------------------------------------------------------------------- /doc/selection-box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/selection-box.png -------------------------------------------------------------------------------- /doc/selection-properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/selection-properties.png -------------------------------------------------------------------------------- /doc/time-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/time-panel.png -------------------------------------------------------------------------------- /doc/views-panel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/doc/views-panel.png -------------------------------------------------------------------------------- /icons/classes/Axes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Axes.png -------------------------------------------------------------------------------- /icons/classes/Camera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Camera.png -------------------------------------------------------------------------------- /icons/classes/DepthCloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/DepthCloud.png -------------------------------------------------------------------------------- /icons/classes/Effort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Effort.png -------------------------------------------------------------------------------- /icons/classes/FluidPressure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/FluidPressure.png -------------------------------------------------------------------------------- /icons/classes/Grid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Grid.png -------------------------------------------------------------------------------- /icons/classes/GridCells.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/GridCells.png -------------------------------------------------------------------------------- /icons/classes/Group.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Group.png -------------------------------------------------------------------------------- /icons/classes/Illuminance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Illuminance.png -------------------------------------------------------------------------------- /icons/classes/Image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Image.png -------------------------------------------------------------------------------- /icons/classes/Interact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Interact.png -------------------------------------------------------------------------------- /icons/classes/InteractiveMarkers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/InteractiveMarkers.png -------------------------------------------------------------------------------- /icons/classes/LaserScan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/LaserScan.png -------------------------------------------------------------------------------- /icons/classes/Map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Map.png -------------------------------------------------------------------------------- /icons/classes/Marker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Marker.png -------------------------------------------------------------------------------- /icons/classes/MarkerArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/MarkerArray.png -------------------------------------------------------------------------------- /icons/classes/MoveCamera.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/MoveCamera.png -------------------------------------------------------------------------------- /icons/classes/Odometry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Odometry.png -------------------------------------------------------------------------------- /icons/classes/Path.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Path.png -------------------------------------------------------------------------------- /icons/classes/PointCloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/PointCloud.png -------------------------------------------------------------------------------- /icons/classes/PointCloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/PointCloud2.png -------------------------------------------------------------------------------- /icons/classes/PointStamped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/PointStamped.png -------------------------------------------------------------------------------- /icons/classes/Polygon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Polygon.png -------------------------------------------------------------------------------- /icons/classes/Pose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Pose.png -------------------------------------------------------------------------------- /icons/classes/PoseArray.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/PoseArray.png -------------------------------------------------------------------------------- /icons/classes/PoseWithCovariance.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/PoseWithCovariance.png -------------------------------------------------------------------------------- /icons/classes/Range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Range.png -------------------------------------------------------------------------------- /icons/classes/RelativeHumidity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/RelativeHumidity.png -------------------------------------------------------------------------------- /icons/classes/RobotJoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/RobotJoint.png -------------------------------------------------------------------------------- /icons/classes/RobotLink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/RobotLink.png -------------------------------------------------------------------------------- /icons/classes/RobotLinkNoGeom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/RobotLinkNoGeom.png -------------------------------------------------------------------------------- /icons/classes/RobotModel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/RobotModel.png -------------------------------------------------------------------------------- /icons/classes/Select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Select.png -------------------------------------------------------------------------------- /icons/classes/Selection.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Selection.png -------------------------------------------------------------------------------- /icons/classes/SetGoal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/SetGoal.png -------------------------------------------------------------------------------- /icons/classes/SetInitialPose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/SetInitialPose.png -------------------------------------------------------------------------------- /icons/classes/TF.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/TF.png -------------------------------------------------------------------------------- /icons/classes/Temperature.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Temperature.png -------------------------------------------------------------------------------- /icons/classes/Tool Properties.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/Tool Properties.png -------------------------------------------------------------------------------- /icons/classes/WrenchStamped.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/WrenchStamped.png -------------------------------------------------------------------------------- /icons/classes/src/Arrow.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/Arrow.xcf -------------------------------------------------------------------------------- /icons/classes/src/Axes.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/Axes.xcf -------------------------------------------------------------------------------- /icons/classes/src/GridCells.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/GridCells.xcf -------------------------------------------------------------------------------- /icons/classes/src/InteractiveMarker.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/InteractiveMarker.xcf -------------------------------------------------------------------------------- /icons/classes/src/Map.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/Map.xcf -------------------------------------------------------------------------------- /icons/classes/src/MarkerArray.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/MarkerArray.xcf -------------------------------------------------------------------------------- /icons/classes/src/Poly.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/Poly.xcf -------------------------------------------------------------------------------- /icons/classes/src/Polygon.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/Polygon.xcf -------------------------------------------------------------------------------- /icons/classes/src/PoseArray.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/PoseArray.xcf -------------------------------------------------------------------------------- /icons/classes/src/Range.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/Range.xcf -------------------------------------------------------------------------------- /icons/classes/src/RobotModel.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/RobotModel.xcf -------------------------------------------------------------------------------- /icons/classes/src/TF.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/classes/src/TF.xcf -------------------------------------------------------------------------------- /icons/default_class_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/default_class_icon.png -------------------------------------------------------------------------------- /icons/default_package_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/default_package_icon.png -------------------------------------------------------------------------------- /icons/error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/error.png -------------------------------------------------------------------------------- /icons/failed_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/failed_display.png -------------------------------------------------------------------------------- /icons/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/minus.png -------------------------------------------------------------------------------- /icons/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/ok.png -------------------------------------------------------------------------------- /icons/options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/options.png -------------------------------------------------------------------------------- /icons/package.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/package.png -------------------------------------------------------------------------------- /icons/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/plus.png -------------------------------------------------------------------------------- /icons/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/icons/warning.png -------------------------------------------------------------------------------- /image_src/R.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/R.blend -------------------------------------------------------------------------------- /image_src/R.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/R.stl -------------------------------------------------------------------------------- /image_src/RViz.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/RViz.blend -------------------------------------------------------------------------------- /image_src/RViz.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/RViz.stl -------------------------------------------------------------------------------- /image_src/Viz.blend: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/Viz.blend -------------------------------------------------------------------------------- /image_src/Viz.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/Viz.stl -------------------------------------------------------------------------------- /image_src/rviz_isolated.xcf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/rviz_isolated.xcf -------------------------------------------------------------------------------- /image_src/splash_shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/image_src/splash_shot.png -------------------------------------------------------------------------------- /images/splash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/images/splash.png -------------------------------------------------------------------------------- /images/splash_overlay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/images/splash_overlay.png -------------------------------------------------------------------------------- /ogre_media/fonts/README.md: -------------------------------------------------------------------------------- 1 | This package uses the Liberation Sans font. 2 | 3 | https://en.wikipedia.org/wiki/Liberation_fonts 4 | 5 | https://www.fontsquirrel.com/fonts/Liberation-Sans 6 | -------------------------------------------------------------------------------- /ogre_media/fonts/liberation-sans/LiberationSans-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/fonts/liberation-sans/LiberationSans-Bold.ttf -------------------------------------------------------------------------------- /ogre_media/fonts/liberation-sans/LiberationSans-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/fonts/liberation-sans/LiberationSans-BoldItalic.ttf -------------------------------------------------------------------------------- /ogre_media/fonts/liberation-sans/LiberationSans-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/fonts/liberation-sans/LiberationSans-Italic.ttf -------------------------------------------------------------------------------- /ogre_media/fonts/liberation-sans/LiberationSans-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/fonts/liberation-sans/LiberationSans-Regular.ttf -------------------------------------------------------------------------------- /ogre_media/fonts/ogre1.10.fontdef: -------------------------------------------------------------------------------- 1 | font "Liberation Sans" 2 | { 3 | type truetype 4 | source liberation-sans/LiberationSans-Regular.ttf 5 | size 18 6 | resolution 96 7 | } 8 | -------------------------------------------------------------------------------- /ogre_media/fonts/ogre1.9.fontdef: -------------------------------------------------------------------------------- 1 | Liberation Sans 2 | { 3 | type truetype 4 | source liberation-sans/LiberationSans-Regular.ttf 5 | size 18 6 | resolution 96 7 | } 8 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/black.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Returns black. 4 | 5 | void main() 6 | { 7 | gl_FragColor = vec4( 0, 0, 0, 0 ); 8 | } 9 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/depth.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Passes on the packed depth value 4 | 5 | // includes 6 | vec4 packDepth( ); 7 | 8 | void main() 9 | { 10 | gl_FragColor = packDepth(); 11 | } 12 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/depth.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Minimal depth passthrough shader 4 | 5 | uniform mat4 worldviewproj_matrix; 6 | 7 | void passDepth( vec4 pos ); 8 | 9 | void main() { 10 | gl_Position = worldviewproj_matrix * gl_Vertex; 11 | passDepth( gl_Vertex ); 12 | } 13 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/depth_circle.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Draws a circle with the packed depth value 4 | 5 | // includes 6 | vec4 packDepth( ); 7 | void circleImpl( vec4 color, float ax, float ay ); 8 | 9 | void main() 10 | { 11 | circleImpl( packDepth(), gl_TexCoord[0].x-0.5, gl_TexCoord[0].y-0.5 ); 12 | } 13 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/flat_color.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Passes the fragment color, multiplying a with the alpha param 4 | 5 | uniform vec4 highlight; 6 | uniform float alpha; 7 | 8 | 9 | void main() 10 | { 11 | vec3 col = gl_Color.xyz + gl_Color.xyz * highlight.xyz; 12 | gl_FragColor = vec4(col, gl_Color.a * alpha); 13 | } 14 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/flat_color_circle.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Draws a circle in the fragment color, multiplying a with the alpha param 4 | 5 | uniform vec4 highlight; 6 | uniform float alpha; 7 | 8 | void circleImpl( vec4 color, float ax, float ay ); 9 | 10 | void main() 11 | { 12 | vec3 col = gl_Color.xyz + gl_Color.xyz * highlight.xyz; 13 | circleImpl( vec4(col, alpha * gl_Color.a), gl_TexCoord[0].x-0.5, gl_TexCoord[0].y-0.5 ); 14 | } 15 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/include/circle_impl.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // rasterizes a circle of radius 0.5 4 | void circleImpl( vec4 color, float ax, float ay ) 5 | { 6 | float rsquared = ax*ax+ay*ay; 7 | float a = (0.25 - rsquared) * 4.0; 8 | gl_FragColor = vec4(color.rgb, color.a * ceil(a)); 9 | } 10 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/include/pack_depth.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Splits up a normalized depth value in the range (0..1) 4 | // into the vertex RGB values. 5 | // Alpha values below 1/255 are rendered transparent. 6 | 7 | uniform float alpha; 8 | uniform float far_clip_distance; 9 | 10 | const float minimum_alpha = 1.0 / 255.0; 11 | 12 | varying float depth; 13 | 14 | vec4 packDepth() 15 | { 16 | float normalized_depth = depth / far_clip_distance; 17 | 18 | // split up float into rgb components 19 | const vec3 shift = vec3(256.0 * 256.0, 256.0, 1.0); 20 | const vec3 mask = vec3(0.0, 1.0 / 256.0, 1.0 / 256.0); 21 | vec3 depth_packed = fract(normalized_depth * shift); 22 | depth_packed -= depth_packed.xxy * mask; 23 | 24 | return vec4( depth_packed.zyx, step( minimum_alpha, alpha )); 25 | } 26 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/include/pass_depth.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | uniform mat4 worldview_matrix; 4 | 5 | varying float depth; 6 | 7 | void passDepth( vec4 pos ) 8 | { 9 | vec4 pos_rel_view = worldview_matrix * pos; 10 | depth = -pos_rel_view.z; 11 | } 12 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/indexed_8bit_image.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Draws an 8-bit image using RGB values from a 256x1 palette texture. 4 | 5 | varying vec2 UV; 6 | uniform sampler2D eight_bit_image; 7 | uniform sampler1D palette; 8 | uniform float alpha; 9 | 10 | void main() 11 | { 12 | // The 0.999 multiply is needed because brightness value 255 comes 13 | // out of texture2D() as 1.0, which wraps around to 0.0 in the 14 | // palette texture. 15 | vec4 color = texture1D( palette, 0.999 * texture2D( eight_bit_image, UV ).x ); 16 | gl_FragColor = vec4( color.rgb, color.a * alpha ); 17 | } 18 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/indexed_8bit_image.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Draws an 8-bit image using RGB values from a 256x1 palette texture. 4 | // This vertex shader just passes through the UV texture coordinates. 5 | // I'm not sure if it is necessary or not. 6 | 7 | attribute vec4 uv0; 8 | varying vec2 UV; 9 | 10 | void main() 11 | { 12 | gl_Position = ftransform(); 13 | UV = vec2(uv0); 14 | } 15 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/nogp/billboard.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Computes the position of a billboard vertex so 4 | // the resulting quad will face the camera. 5 | // Texture coords are used to determine which corner 6 | // of the billboard we compute. 7 | 8 | uniform mat4 worldviewproj_matrix; 9 | uniform vec4 camera_pos; 10 | uniform vec4 size; 11 | uniform vec4 auto_size; 12 | 13 | #ifdef WITH_DEPTH 14 | //include: 15 | void passDepth( vec4 pos ); 16 | #endif 17 | 18 | void main() 19 | { 20 | vec3 at = camera_pos.xyz - gl_Vertex.xyz; 21 | at = normalize(at); 22 | vec3 right = cross(vec3( 0.0, 1.0, 0.0 ), at); 23 | vec3 up = cross(at, right); 24 | right = normalize(right); 25 | up = normalize(up); 26 | 27 | // if auto_size == 1, then size_factor == size*gl_Vertex.z 28 | // if auto_size == 0, then size_factor == size 29 | vec4 size_factor = (1-auto_size.x+(auto_size.x*gl_Vertex.z))*size; 30 | 31 | vec4 s = gl_MultiTexCoord0 * (size_factor); 32 | vec3 r = s.xxx * right; 33 | vec3 u = s.yyy * up; 34 | 35 | vec4 pos = gl_Vertex + vec4( r + u, 0.0 ); 36 | 37 | gl_Position = worldviewproj_matrix * pos; 38 | gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(0.5,0.5,0.0,0.0); 39 | gl_FrontColor = gl_Color; 40 | 41 | #ifdef WITH_DEPTH 42 | passDepth( pos ); 43 | #endif 44 | } 45 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/nogp/billboard_tile.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Computes the position of a billboard vertex so 4 | // the resulting quad will face a given direction given by up & normal. 5 | // Texture coords are used to determine which corner 6 | // of the billboard we compute. 7 | 8 | uniform mat4 worldviewproj_matrix; 9 | uniform vec4 size; 10 | uniform vec4 normal; 11 | uniform vec4 up; 12 | 13 | #ifdef WITH_DEPTH 14 | //include: 15 | void passDepth( vec4 pos ); 16 | #endif 17 | 18 | void main() 19 | { 20 | vec3 right = cross(up.xyz, normal.xyz); 21 | 22 | vec4 s = gl_MultiTexCoord0 * size; 23 | vec3 r = s.xxx * right; 24 | vec3 u = s.yyy * up.xyz; 25 | 26 | vec4 pos = gl_Vertex + vec4( r + u, 0.0 ); 27 | 28 | gl_Position = worldviewproj_matrix * pos; 29 | gl_TexCoord[0] = gl_MultiTexCoord0 + vec4(0.5,0.5,0.0,0.0); 30 | gl_FrontColor = gl_Color; 31 | 32 | #ifdef WITH_DEPTH 33 | passDepth( pos ); 34 | #endif 35 | } 36 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/nogp/box.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // rasterizes a smooth square on any face of a box 4 | // and creates a fake lighting effect 5 | // x,y,z texture coords must be in the interval (-0.5...0.5) 6 | 7 | uniform vec4 highlight; 8 | uniform float alpha; 9 | 10 | const float lightness[6] = float[] ( 11 | 0.9, 0.5, 0.6, 0.6, 1.0, 0.4 ); 12 | 13 | void main() 14 | { 15 | float ax; 16 | float ay; 17 | float l; 18 | 19 | if ( gl_TexCoord[0].z < -0.4999 ) 20 | { 21 | ax = gl_TexCoord[0].x; 22 | ay = gl_TexCoord[0].y; 23 | l = lightness[0]; 24 | } 25 | else if ( gl_TexCoord[0].z > 0.4999 ) 26 | { 27 | ax = gl_TexCoord[0].x; 28 | ay = gl_TexCoord[0].y; 29 | l = lightness[1]; 30 | } 31 | else if ( gl_TexCoord[0].x > 0.4999 ) 32 | { 33 | ax = gl_TexCoord[0].y; 34 | ay = gl_TexCoord[0].z; 35 | l = lightness[2]; 36 | } 37 | else if ( gl_TexCoord[0].x < -0.4999 ) 38 | { 39 | ax = gl_TexCoord[0].y; 40 | ay = gl_TexCoord[0].z; 41 | l = lightness[3]; 42 | } 43 | else if ( gl_TexCoord[0].y > 0.4999 ) 44 | { 45 | ax = gl_TexCoord[0].x; 46 | ay = gl_TexCoord[0].z; 47 | l = lightness[4]; 48 | } 49 | else 50 | { 51 | ax = gl_TexCoord[0].x; 52 | ay = gl_TexCoord[0].z; 53 | l = lightness[5]; 54 | } 55 | 56 | float blend = smoothstep(-0.48, -0.45, ay) * (1.0 - smoothstep(0.45, 0.48, ay)) * 57 | smoothstep(-0.48, -0.45, ax) * (1.0 - smoothstep(0.45, 0.48, ax)); 58 | 59 | float inv_blend = 1.0 - blend; 60 | 61 | //vec3 col = blend * gl_Color.xyz + (sign(0.5 - length(vec3(gl_Color.xyz))) * vec3(0.2, 0.2, 0.2) + gl_Color.xyz) * inv_blend; 62 | 63 | //alternative version: make color at edge darker 64 | vec3 col = (0.5 + 0.5*blend) * gl_Color.xyz; 65 | 66 | col = col * l; 67 | 68 | col = col + col * highlight.xyz; 69 | 70 | 71 | gl_FragColor = vec4(col.r, col.g, col.b, alpha * gl_Color.a ); 72 | } 73 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/nogp/box.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Computes the position of a box vertex from its texture coords. 4 | // Used in case that geometry shaders are not supported. 5 | 6 | uniform mat4 worldviewproj_matrix; 7 | uniform vec4 camera_pos; 8 | uniform vec4 size; 9 | uniform vec4 auto_size; 10 | 11 | #ifdef WITH_DEPTH 12 | //include: 13 | void passDepth( vec4 pos ); 14 | #endif 15 | 16 | void main() 17 | { 18 | // if auto_size == 1, then size_factor == size*gl_Vertex.z 19 | // if auto_size == 0, then size_factor == size 20 | vec4 size_factor = (1-auto_size.x+(auto_size.x*gl_Vertex.z))*size; 21 | 22 | vec4 s = gl_MultiTexCoord0 * size_factor; 23 | vec4 pos = gl_Vertex - s; 24 | gl_Position = worldviewproj_matrix * pos; 25 | gl_TexCoord[0] = gl_MultiTexCoord0; 26 | gl_FrontColor = gl_Color; 27 | 28 | #ifdef WITH_DEPTH 29 | passDepth( pos ); 30 | #endif 31 | } 32 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/pass_color.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Passes the fragment color unchanged 4 | 5 | void main() 6 | { 7 | gl_FragColor = gl_Color; 8 | } 9 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/pass_color_circle.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Draws a circle in the fragment color 4 | 5 | //includes: 6 | void circleImpl( vec4 color, float ax, float ay ); 7 | 8 | void main() 9 | { 10 | circleImpl( gl_Color, gl_TexCoord[0].x-0.5, gl_TexCoord[0].y-0.5 ); 11 | } 12 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/pickcolor.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Passes the vertex pick color 4 | 5 | uniform vec4 pick_color; 6 | 7 | void main() 8 | { 9 | gl_FragColor = pick_color; 10 | } 11 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/pickcolor_circle.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Draws a circle in the pick color 4 | 5 | //includes: 6 | void circleImpl( vec4 color, float ax, float ay ); 7 | 8 | uniform vec4 pick_color; 9 | 10 | void main() 11 | { 12 | circleImpl( pick_color, gl_TexCoord[0].x-0.5, gl_TexCoord[0].y-0.5 ); 13 | } 14 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/point.vert: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // Generic vertex shader for point sprites 4 | // sets position and point size. 5 | // Works for perspective and orthographic projection. 6 | 7 | uniform mat4 worldviewproj_matrix; 8 | uniform vec4 size; 9 | 10 | #ifdef WITH_DEPTH 11 | //include: 12 | void passDepth( vec4 pos ); 13 | #endif 14 | 15 | void main() 16 | { 17 | gl_Position = worldviewproj_matrix * gl_Vertex; 18 | gl_FrontColor = gl_Color; 19 | gl_PointSize = size.x; 20 | 21 | #ifdef WITH_DEPTH 22 | passDepth( gl_Vertex ); 23 | #endif 24 | } 25 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/shaded_circle.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // rasterizes a circle that is darker at the borders than in the center 4 | 5 | uniform vec4 highlight; 6 | uniform float alpha; 7 | 8 | 9 | void main() 10 | { 11 | float ax = gl_TexCoord[0].x-0.5; 12 | float ay = gl_TexCoord[0].y-0.5; 13 | 14 | float rsquared = ax*ax+ay*ay; 15 | float a = (0.25 - rsquared) * 4.0; 16 | 17 | vec3 col = mix(vec3(0.8, 0.8, 0.8) * gl_Color.xyz, gl_Color.xyz, a); 18 | 19 | col = col + col * highlight.xyz; 20 | 21 | gl_FragColor = vec4(col, alpha * ceil(a) * gl_Color.a); 22 | } 23 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/smooth_square.frag: -------------------------------------------------------------------------------- 1 | #version 120 2 | 3 | // rasterizes a smooth square with ax,ay in [-0.5..0.5] 4 | 5 | uniform vec4 highlight; 6 | uniform float alpha; 7 | 8 | void main() 9 | { 10 | float ax = gl_TexCoord[0].x-0.5; 11 | float ay = gl_TexCoord[0].y-0.5; 12 | 13 | float blend = smoothstep(-0.48, -0.45, ay) * (1.0 - smoothstep(0.45, 0.48, ay)) * 14 | smoothstep(-0.48, -0.45, ax) * (1.0 - smoothstep(0.45, 0.48, ax)); 15 | 16 | float inv_blend = 1.0 - blend; 17 | vec3 col = blend * gl_Color.xyz + (sign(0.5 - length(vec3(gl_Color.xyz))) * vec3(0.2, 0.2, 0.2) + gl_Color.xyz) * inv_blend; 18 | 19 | //alternative version: make color at edge darker 20 | //vec3 col = (0.5 + 0.5*blend) * gl_Color.xyz; 21 | 22 | col = col + col * highlight.xyz; 23 | 24 | gl_FragColor = vec4(col.r, col.g, col.b, alpha * gl_Color.a ); 25 | } 26 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl120/test_glsl.sh: -------------------------------------------------------------------------------- 1 | if [[ "$1" == *.vert ]]; then 2 | cgc -oglsl -profile arbvp1 -strict -nocode $1 3 | elif [[ "$1" == *.frag ]]; then 4 | cgc -oglsl -profile arbfp1 -strict -nocode $1 5 | elif [[ "$1" == *.geom ]]; then 6 | cgc -oglsl -profile gs_5_0 -strict -nocode $1 7 | else 8 | echo "Unknown shader type!" 9 | exit 1 10 | fi 11 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl150/billboard.geom: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | // Generates view-facing square (billboard) with a given size 4 | // for each input vertex. 5 | 6 | #ifdef WITH_DEPTH 7 | uniform mat4 worldview_matrix; 8 | out float depth; 9 | 10 | void passDepth( vec4 pos ) 11 | { 12 | vec4 pos_rel_view = worldview_matrix * pos; 13 | depth = -pos_rel_view.z; 14 | } 15 | #endif 16 | 17 | uniform mat4 inverse_worldview_matrix; 18 | uniform mat4 worldviewproj_matrix; 19 | uniform vec4 size; 20 | uniform vec4 auto_size; 21 | 22 | in gl_PerVertex { 23 | vec4 gl_Position; 24 | vec4 gl_FrontColor; 25 | } gl_in[]; 26 | 27 | out vec4 gl_TexCoord[]; 28 | 29 | layout(points) in; 30 | layout(triangle_strip, max_vertices=4) out; 31 | 32 | void emitVertex( vec3 pos_rel, vec3 tex ) 33 | { 34 | pos_rel = mat3(inverse_worldview_matrix) * pos_rel; 35 | vec4 pos = gl_in[0].gl_Position + vec4(pos_rel,0.0); 36 | gl_Position = worldviewproj_matrix * pos; 37 | gl_TexCoord[0] = vec4( tex.xy, 0.0, 0.0 ); 38 | gl_FrontColor = vec4( gl_in[0].gl_FrontColor ); 39 | EmitVertex(); 40 | } 41 | 42 | void main() 43 | { 44 | // if auto_size == 1, then size_factor == size.x*gl_Vertex.z 45 | // if auto_size == 0, then size_factor == size.x 46 | float size_factor = (1-auto_size.x+(auto_size.x*gl_in[0].gl_Position.z))*size.x; 47 | size_factor = size_factor * 0.5; 48 | 49 | #ifdef WITH_DEPTH 50 | depth = -((worldview_matrix * gl_in[0].gl_Position).z); 51 | #endif 52 | 53 | emitVertex( vec3(-size_factor,-size_factor, 0.0), vec3(0.0, 0.0, 0.0) ); 54 | emitVertex( vec3( size_factor,-size_factor, 0.0), vec3(1.0, 0.0, 0.0) ); 55 | emitVertex( vec3(-size_factor, size_factor, 0.0), vec3(0.0, 1.0, 0.0) ); 56 | emitVertex( vec3( size_factor, size_factor, 0.0), vec3(1.0, 1.0, 0.0) ); 57 | 58 | EndPrimitive(); 59 | } 60 | -------------------------------------------------------------------------------- /ogre_media/materials/glsl150/pass_pos_color.vert: -------------------------------------------------------------------------------- 1 | #version 150 compatibility 2 | 3 | // this merely passes over position and color, 4 | // as needed by box.geom 5 | 6 | out gl_PerVertex { 7 | vec4 gl_Position; 8 | vec4 gl_FrontColor; 9 | }; 10 | 11 | void main() { 12 | gl_Position = gl_Vertex; 13 | gl_FrontColor = gl_Color; 14 | } 15 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts/default_pick_and_depth.material: -------------------------------------------------------------------------------- 1 | material rviz/DefaultPickAndDepth 2 | { 3 | technique PickCull 4 | { 5 | pass 6 | { 7 | lighting off 8 | scene_blend one zero 9 | cull_hardware clockwise 10 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 11 | } 12 | } 13 | 14 | technique BlackCull 15 | { 16 | pass 17 | { 18 | lighting off 19 | scene_blend one zero 20 | cull_hardware clockwise 21 | fragment_program_ref rviz/glsl120/black.frag {} 22 | } 23 | } 24 | 25 | technique DepthCull 26 | { 27 | pass 28 | { 29 | scene_blend one zero 30 | cull_hardware clockwise 31 | vertex_program_ref rviz/glsl120/depth.vert {} 32 | fragment_program_ref rviz/glsl120/depth.frag {} 33 | } 34 | } 35 | 36 | technique Pick 37 | { 38 | pass 39 | { 40 | lighting off 41 | scene_blend one zero 42 | cull_hardware none 43 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 44 | } 45 | } 46 | 47 | technique Black 48 | { 49 | pass 50 | { 51 | lighting off 52 | scene_blend one zero 53 | cull_hardware none 54 | fragment_program_ref rviz/glsl120/black.frag {} 55 | } 56 | } 57 | 58 | technique Depth 59 | { 60 | pass 61 | { 62 | scene_blend one zero 63 | cull_hardware none 64 | vertex_program_ref rviz/glsl120/depth.vert {} 65 | fragment_program_ref rviz/glsl120/depth.frag {} 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts/indexed_8bit_image.material: -------------------------------------------------------------------------------- 1 | material rviz/Indexed8BitImage 2 | { 3 | technique 4 | { 5 | pass 6 | { 7 | vertex_program_ref rviz/glsl120/indexed_8bit_image.vert {} 8 | 9 | fragment_program_ref rviz/glsl120/indexed_8bit_image.frag 10 | { 11 | param_named eight_bit_image int 0 12 | param_named palette int 1 13 | } 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts/point_cloud_point.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudPoint 2 | { 3 | technique gp 4 | { 5 | pass 6 | { 7 | alpha_rejection greater_equal 1 8 | point_size_attenuation on 9 | point_sprites on 10 | vertex_program_ref rviz/glsl120/point.vert {} 11 | fragment_program_ref rviz/glsl120/flat_color_circle.frag {} 12 | } 13 | } 14 | 15 | technique depth 16 | { 17 | scheme Depth 18 | pass 19 | { 20 | point_size_attenuation on 21 | vertex_program_ref rviz/glsl120/point.vert(with_depth) {} 22 | fragment_program_ref rviz/glsl120/depth_circle.frag {} 23 | } 24 | } 25 | 26 | technique selection_first_pass 27 | { 28 | scheme Pick 29 | pass 30 | { 31 | point_size_attenuation on 32 | vertex_program_ref rviz/glsl120/point.vert {} 33 | fragment_program_ref rviz/glsl120/pickcolor_circle.frag {} 34 | } 35 | } 36 | 37 | technique selection_second_pass 38 | { 39 | scheme Pick1 40 | pass 41 | { 42 | point_size_attenuation on 43 | vertex_program_ref rviz/glsl120/point.vert {} 44 | fragment_program_ref rviz/glsl120/pass_color_circle.frag {} 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts/point_cloud_tile.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudTile 2 | { 3 | technique nogp { 4 | pass { 5 | alpha_rejection greater_equal 1 6 | cull_hardware none 7 | cull_software none 8 | vertex_program_ref rviz/glsl120/nogp/billboard_tile.vert {} 9 | fragment_program_ref rviz/glsl120/smooth_square.frag {} 10 | } 11 | } 12 | 13 | technique nogp_depth { 14 | scheme Depth 15 | pass { 16 | alpha_rejection greater_equal 1 17 | cull_hardware none 18 | cull_software none 19 | vertex_program_ref rviz/glsl120/nogp/billboard_tile.vert(with_depth) {} 20 | fragment_program_ref rviz/glsl120/depth.frag {} 21 | } 22 | } 23 | 24 | technique nogp_selection_first_pass { 25 | scheme Pick 26 | pass { 27 | alpha_rejection greater_equal 1 28 | cull_hardware none 29 | cull_software none 30 | vertex_program_ref rviz/glsl120/nogp/billboard_tile.vert {} 31 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 32 | } 33 | } 34 | 35 | technique nogp_selection_second_pass { 36 | scheme Pick1 37 | pass { 38 | alpha_rejection greater_equal 1 39 | cull_hardware none 40 | cull_software none 41 | vertex_program_ref rviz/glsl120/nogp/billboard_tile.vert {} 42 | fragment_program_ref rviz/glsl120/pass_color.frag {} 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts120/point_cloud_box.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudBox 2 | { 3 | /* This material should only be used with glsl < 1.50 */ 4 | 5 | /* the 'nogp' techniques require the full box geometry as input */ 6 | 7 | technique nogp 8 | { 9 | pass 10 | { 11 | vertex_program_ref rviz/glsl120/nogp/box.vert {} 12 | fragment_program_ref rviz/glsl120/nogp/box.frag {} 13 | } 14 | } 15 | 16 | technique nogp_depth 17 | { 18 | scheme Depth 19 | pass 20 | { 21 | vertex_program_ref rviz/glsl120/nogp/box.vert(with_depth) {} 22 | fragment_program_ref rviz/glsl120/depth.frag {} 23 | } 24 | } 25 | 26 | technique nogp_selection_first_pass 27 | { 28 | scheme Pick 29 | pass 30 | { 31 | vertex_program_ref rviz/glsl120/nogp/box.vert {} 32 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 33 | } 34 | } 35 | 36 | technique nogp_selection_second_pass 37 | { 38 | scheme Pick1 39 | pass 40 | { 41 | vertex_program_ref rviz/glsl120/nogp/box.vert {} 42 | fragment_program_ref rviz/glsl120/pass_color.frag {} 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts120/point_cloud_flat_square.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudFlatSquare { 2 | 3 | technique nogp { 4 | pass { 5 | alpha_rejection greater_equal 1 6 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 7 | fragment_program_ref rviz/glsl120/flat_color.frag {} 8 | } 9 | } 10 | 11 | technique nogp_depth { 12 | scheme Depth 13 | pass { 14 | alpha_rejection greater_equal 1 15 | vertex_program_ref rviz/glsl120/nogp/billboard.vert(with_depth) {} 16 | fragment_program_ref rviz/glsl120/depth.frag {} 17 | } 18 | } 19 | 20 | technique nogp_selection_first_pass { 21 | scheme Pick 22 | pass { 23 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 24 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 25 | } 26 | } 27 | 28 | technique nogp_selection_second_pass { 29 | scheme Pick1 30 | pass { 31 | alpha_rejection greater_equal 1 32 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 33 | fragment_program_ref rviz/glsl120/pass_color.frag {} 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts120/point_cloud_sphere.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudSphere { 2 | 3 | technique nogp { 4 | pass { 5 | alpha_rejection greater_equal 1 6 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 7 | fragment_program_ref rviz/glsl120/shaded_circle.frag {} 8 | } 9 | } 10 | 11 | technique nogp_depth { 12 | scheme Depth 13 | pass { 14 | alpha_rejection greater_equal 1 15 | vertex_program_ref rviz/glsl120/nogp/billboard.vert(with_depth) {} 16 | fragment_program_ref rviz/glsl120/depth_circle.frag {} 17 | } 18 | } 19 | 20 | technique nogp_selection_first_pass { 21 | scheme Pick 22 | pass { 23 | alpha_rejection greater_equal 1 24 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 25 | fragment_program_ref rviz/glsl120/pickcolor_circle.frag {} 26 | } 27 | } 28 | 29 | technique nogp_selection_second_pass { 30 | scheme Pick1 31 | pass { 32 | alpha_rejection greater_equal 1 33 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 34 | fragment_program_ref rviz/glsl120/pass_color_circle.frag {} 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts120/point_cloud_square.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudSquare { 2 | 3 | technique nogp { 4 | pass { 5 | alpha_rejection greater_equal 1 6 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 7 | fragment_program_ref rviz/glsl120/smooth_square.frag {} 8 | } 9 | } 10 | 11 | technique nogp_depth { 12 | scheme Depth 13 | pass { 14 | alpha_rejection greater_equal 1 15 | vertex_program_ref rviz/glsl120/nogp/billboard.vert(with_depth) {} 16 | fragment_program_ref rviz/glsl120/depth.frag {} 17 | } 18 | } 19 | 20 | technique nogp_selection_first_pass { 21 | scheme Pick 22 | pass { 23 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 24 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 25 | } 26 | } 27 | 28 | technique nogp_selection_second_pass { 29 | scheme Pick1 30 | pass { 31 | alpha_rejection greater_equal 1 32 | vertex_program_ref rviz/glsl120/nogp/billboard.vert {} 33 | fragment_program_ref rviz/glsl120/pass_color.frag {} 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts150/point_cloud_box.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudBox 2 | { 3 | /* This material should only be used with glsl < 1.50 */ 4 | 5 | // the 'gp' techniques need one input vertex per box 6 | // and use geometry shaders to create the geometry 7 | 8 | technique gp 9 | { 10 | pass 11 | { 12 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 13 | geometry_program_ref rviz/glsl150/box.geom(with_lighting) {} 14 | fragment_program_ref rviz/glsl120/smooth_square.frag {} 15 | } 16 | } 17 | 18 | technique gp_depth 19 | { 20 | scheme Depth 21 | pass 22 | { 23 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 24 | geometry_program_ref rviz/glsl150/box.geom(with_depth) {} 25 | fragment_program_ref rviz/glsl120/depth.frag {} 26 | } 27 | } 28 | 29 | technique gp_selection_first_pass 30 | { 31 | scheme Pick 32 | pass 33 | { 34 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 35 | geometry_program_ref rviz/glsl150/box.geom {} 36 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 37 | } 38 | } 39 | 40 | technique gp_selection_second_pass 41 | { 42 | scheme Pick1 43 | pass 44 | { 45 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 46 | geometry_program_ref rviz/glsl150/box.geom {} 47 | fragment_program_ref rviz/glsl120/pass_color.frag {} 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts150/point_cloud_flat_square.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudFlatSquare { 2 | 3 | technique gp 4 | { 5 | pass 6 | { 7 | alpha_rejection greater_equal 1 8 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 9 | geometry_program_ref rviz/glsl150/billboard.geom {} 10 | fragment_program_ref rviz/glsl120/flat_color.frag {} 11 | } 12 | } 13 | 14 | technique gp_depth 15 | { 16 | scheme Depth 17 | pass 18 | { 19 | alpha_rejection greater_equal 1 20 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 21 | geometry_program_ref rviz/glsl150/billboard.geom(with_depth) {} 22 | fragment_program_ref rviz/glsl120/depth.frag {} 23 | } 24 | } 25 | 26 | technique gp_selection_first_pass 27 | { 28 | scheme Pick 29 | pass 30 | { 31 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 32 | geometry_program_ref rviz/glsl150/billboard.geom {} 33 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 34 | } 35 | } 36 | 37 | technique gp_selection_second_pass 38 | { 39 | scheme Pick1 40 | pass 41 | { 42 | alpha_rejection greater_equal 1 43 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 44 | geometry_program_ref rviz/glsl150/billboard.geom {} 45 | fragment_program_ref rviz/glsl120/pass_color.frag {} 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts150/point_cloud_sphere.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudSphere { 2 | 3 | technique gp 4 | { 5 | pass 6 | { 7 | alpha_rejection greater_equal 1 8 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 9 | geometry_program_ref rviz/glsl150/billboard.geom {} 10 | fragment_program_ref rviz/glsl120/shaded_circle.frag {} 11 | } 12 | } 13 | 14 | technique gp_depth 15 | { 16 | scheme Depth 17 | pass 18 | { 19 | alpha_rejection greater_equal 1 20 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 21 | geometry_program_ref rviz/glsl150/billboard.geom(with_depth) {} 22 | fragment_program_ref rviz/glsl120/depth.frag {} 23 | } 24 | } 25 | 26 | technique gp_selection_first_pass 27 | { 28 | scheme Pick 29 | pass 30 | { 31 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 32 | geometry_program_ref rviz/glsl150/billboard.geom {} 33 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 34 | } 35 | } 36 | 37 | technique gp_selection_second_pass 38 | { 39 | scheme Pick1 40 | pass 41 | { 42 | alpha_rejection greater_equal 1 43 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 44 | geometry_program_ref rviz/glsl150/billboard.geom {} 45 | fragment_program_ref rviz/glsl120/pass_color.frag {} 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ogre_media/materials/scripts150/point_cloud_square.material: -------------------------------------------------------------------------------- 1 | material rviz/PointCloudSquare { 2 | 3 | technique gp 4 | { 5 | pass 6 | { 7 | alpha_rejection greater_equal 1 8 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 9 | geometry_program_ref rviz/glsl150/billboard.geom {} 10 | fragment_program_ref rviz/glsl120/smooth_square.frag {} 11 | } 12 | } 13 | 14 | technique gp_depth 15 | { 16 | scheme Depth 17 | pass 18 | { 19 | alpha_rejection greater_equal 1 20 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 21 | geometry_program_ref rviz/glsl150/billboard.geom(with_depth) {} 22 | fragment_program_ref rviz/glsl120/depth.frag {} 23 | } 24 | } 25 | 26 | technique gp_selection_first_pass 27 | { 28 | scheme Pick 29 | pass 30 | { 31 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 32 | geometry_program_ref rviz/glsl150/billboard.geom {} 33 | fragment_program_ref rviz/glsl120/pickcolor.frag {} 34 | } 35 | } 36 | 37 | technique gp_selection_second_pass 38 | { 39 | scheme Pick1 40 | pass 41 | { 42 | alpha_rejection greater_equal 1 43 | vertex_program_ref rviz/glsl150/pass_pos_color.vert {} 44 | geometry_program_ref rviz/glsl150/billboard.geom {} 45 | fragment_program_ref rviz/glsl120/pass_color.frag {} 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /ogre_media/models/rviz_cone.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/models/rviz_cone.mesh -------------------------------------------------------------------------------- /ogre_media/models/rviz_cube.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/models/rviz_cube.mesh -------------------------------------------------------------------------------- /ogre_media/models/rviz_cylinder.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/models/rviz_cylinder.mesh -------------------------------------------------------------------------------- /ogre_media/models/rviz_sphere.mesh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/models/rviz_sphere.mesh -------------------------------------------------------------------------------- /ogre_media/plugins.cfg: -------------------------------------------------------------------------------- 1 | # dummy plugins.cfg, needed so Ogre does not throw an exception 2 | -------------------------------------------------------------------------------- /ogre_media/textures/no_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/ogre_media/textures/no_image.png -------------------------------------------------------------------------------- /rosdoc.yaml: -------------------------------------------------------------------------------- 1 | - builder: doxygen 2 | name: C++ API 3 | output_dir: c++ 4 | file_patterns: '*.cpp *.h *.dox' 5 | - builder: sphinx 6 | name: User's Guide 7 | sphinx_root_dir: doc 8 | output_dir: user_guide 9 | -------------------------------------------------------------------------------- /rviz.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "path": "." 6 | } 7 | ], 8 | "settings": 9 | { 10 | "sublimeclang_options": 11 | [ 12 | "-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1", 13 | "-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include", 14 | "-I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include", 15 | "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include", 16 | "-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks", 17 | // "-framework QtCore", 18 | // "-framework QtGui", 19 | // "-I/usr/local/Cellar/qt/4.8.6/lib/QtCore.framework/Versions/4/Headers", 20 | // "-I/usr/local/Cellar/qt/4.8.6/lib/QtGui.framework/Versions/4/Headers", 21 | "-I/usr/local/Cellar/qt5/5.5.1_2/include", 22 | "-I/usr/local/Cellar/qt5/5.5.1_2/Frameworks/QtCore.framework/Versions/Current/Headers", 23 | "-I/usr/local/Cellar/qt5/5.5.1_2/Frameworks/QtGui.framework/Versions/Current/Headers", 24 | "-I/usr/local/Cellar/qt5/5.5.1_2/Frameworks/QtWidgets.framework/Versions/Current/Headers", 25 | "-I/usr/local/Cellar/ogre-1.9/1.9.0/include", 26 | "-I/usr/local/Cellar/ogre-1.9/1.9.0/include/OGRE", 27 | "-I/usr/local/Cellar/ogre-1.9/1.9.0/include/OGRE/Overlay", 28 | "-I/usr/local/opt/eigen/include/eigen3", 29 | "-I/Users/william/rviz_ws/install_isolated/include", 30 | "-I${folder:${project_path:rviz.sublime-project}}/src", 31 | "-I${folder:${project_path:rviz.sublime-project}}/src/rviz", 32 | "-DROS_PACKAGE_NAME=\"rviz\"", 33 | "-Wno-deprecated-register", 34 | "-Wno-unused-parameter", 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /scripts/system_info.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Shell script to print information about the computer, for use in reporting rviz bugs. 4 | 5 | echo "Graphics card" 6 | lspci | grep VGA 7 | echo 8 | 9 | echo "OS" 10 | cat /etc/issue 11 | 12 | echo "Machine" 13 | uname -a 14 | echo 15 | 16 | if [ -x /usr/bin/glxinfo ]; then 17 | echo "OpenGL driver info" 18 | glxinfo 19 | echo 20 | else 21 | echo "ERROR: glxinfo command not found. To find opengl driver info, please install it with this command:" 22 | echo " sudo apt-get install mesa-utils" 23 | echo "and re-run $0" 24 | fi 25 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from setuptools import setup 4 | from catkin_pkg.python_setup import generate_distutils_setup 5 | 6 | d = generate_distutils_setup( 7 | packages=["rviz"], 8 | package_dir={"": "src/python_bindings"}, 9 | requires=["roslib", "rospkg", "python_qt_bindings"], 10 | ) 11 | 12 | setup(**d) 13 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(rviz) 2 | add_subdirectory(image_view) 3 | if (CATKIN_ENABLE_TESTING) 4 | add_subdirectory(test) 5 | endif() 6 | add_subdirectory(python_bindings) 7 | -------------------------------------------------------------------------------- /src/image_view/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_executable(rviz_image_view 2 | image_view.cpp 3 | main.cpp 4 | ) 5 | 6 | target_link_libraries(rviz_image_view 7 | ${OGRE_LIBRARIES} 8 | ${rviz_ADDITIONAL_LIBRARIES} 9 | ${PROJECT_NAME} 10 | ) 11 | 12 | set_target_properties(rviz_image_view 13 | PROPERTIES OUTPUT_NAME image_view 14 | PREFIX "") 15 | -------------------------------------------------------------------------------- /src/python_bindings/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | set(rviz_BINDINGS "") 2 | 3 | # TODO(wjwwood): re-enabled PySide2 support when it is fixed. 4 | # add_subdirectory(shiboken) 5 | add_subdirectory(sip) 6 | 7 | message(STATUS "Python binding generators: ${rviz_BINDINGS}") 8 | if(NOT rviz_BINDINGS) 9 | message(FATAL_ERROR "No Python binding generator found.") 10 | endif() 11 | -------------------------------------------------------------------------------- /src/python_bindings/rviz/__init__.py: -------------------------------------------------------------------------------- 1 | # Python package 'rviz' initialization. 2 | # 3 | # The actual implementations are defined in C++ and wrapped by 4 | # shiboken or sip. This wrapper finds which binding is available and 5 | # presents it as package rviz. 6 | 7 | import sys 8 | 9 | # Can use the following setattr() call to force one binding or the other. 10 | # setattr(sys, 'SELECT_QT_BINDING', 'pyside') 11 | 12 | from python_qt_binding import QT_BINDING 13 | 14 | if QT_BINDING == "pyside": 15 | 16 | # Import the shared library generated by the shiboken binding-generator. 17 | from . import librviz_shiboken as bindings 18 | 19 | # Expose the contained rviz class as bindings 20 | bindings = bindings.rviz 21 | 22 | elif QT_BINDING == "pyqt": 23 | 24 | # Import the shared library generated by the sip binding-generator. 25 | from . import librviz_sip as bindings 26 | 27 | # Expose the contained rviz class as bindings 28 | bindings = bindings.rviz 29 | 30 | else: 31 | raise ImportError('Qt binding name "%s" is unknown.' % QT_BINDING) 32 | -------------------------------------------------------------------------------- /src/python_bindings/shiboken/typesystem.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/python_bindings/sip/bool_property.sip: -------------------------------------------------------------------------------- 1 | namespace rviz 2 | { 3 | 4 | class BoolProperty: rviz::Property /NoDefaultCtors/ 5 | { 6 | %TypeHeaderCode 7 | #define ROS_PACKAGE_NAME "rviz" 8 | #include 9 | %End 10 | 11 | public: 12 | BoolProperty( const QString& name = QString(), 13 | bool default_value = false, 14 | const QString& description = QString(), 15 | rviz::Property* parent = 0, 16 | const char *changed_slot = 0, 17 | QObject* receiver = 0 ); 18 | 19 | virtual ~BoolProperty(); 20 | 21 | virtual bool getBool() const; 22 | 23 | public slots: 24 | bool setBool( bool value ); 25 | }; 26 | 27 | }; 28 | -------------------------------------------------------------------------------- /src/python_bindings/sip/config.sip: -------------------------------------------------------------------------------- 1 | namespace rviz 2 | { 3 | 4 | class Config /NoDefaultCtors/ 5 | { 6 | %TypeHeaderCode 7 | #define ROS_PACKAGE_NAME "rviz" 8 | #include 9 | %End 10 | 11 | public: 12 | /** @brief Default constructor. Creates an empty config object. */ 13 | Config(); 14 | /** @brief Copy constructor. Copies only the reference to the data, so creates a shallow copy. */ 15 | Config( const rviz::Config& source ); 16 | /** @brief Convenience constructor, makes a Value type Config object with the given value. */ 17 | Config( QVariant value ); 18 | 19 | enum Type { Map, List, Value, Empty, Invalid }; 20 | rviz::Config::Type getType() const; 21 | void setType( rviz::Config::Type ); 22 | 23 | /** @brief Returns getType() != Invalid. */ 24 | bool isValid() const; 25 | 26 | void mapSetValue( const QString& key, QVariant value ); 27 | rviz::Config mapMakeChild( const QString& key ); 28 | rviz::Config mapGetChild( const QString& key ) const; 29 | 30 | /** @brief Return a new iterator for looping over key/value pairs. */ 31 | rviz::Config::MapIterator mapIterator() const; 32 | 33 | /** @brief Ensures this is a valid Config object, sets the type to Value then sets the value. */ 34 | void setValue( const QVariant& value ); 35 | /** @brief If this config object is valid, this returns its value. If not, it returns an invalid QVariant. */ 36 | QVariant getValue() const; 37 | 38 | int listLength() const; 39 | rviz::Config listChildAt( int i ) const; 40 | rviz::Config listAppendNew(); 41 | 42 | class MapIterator /NoDefaultCtors/ 43 | { 44 | %TypeHeaderCode 45 | #define ROS_PACKAGE_NAME "rviz" 46 | #include 47 | %End 48 | public: 49 | /** @brief Advance iterator to next entry. */ 50 | void advance(); 51 | 52 | /** @brief Return true if there is a next entry, false if not. */ 53 | bool isValid(); 54 | 55 | /** @brief Resets the iterator to the start of the map. */ 56 | void start(); 57 | 58 | /** @brief Return the name of the current map entry. */ 59 | QString currentKey(); 60 | 61 | /** @brief Return the config reference of the current map entry. */ 62 | rviz::Config currentChild(); 63 | }; 64 | }; 65 | 66 | }; 67 | -------------------------------------------------------------------------------- /src/python_bindings/sip/ogre_logging.sip: -------------------------------------------------------------------------------- 1 | namespace rviz 2 | { 3 | 4 | class OgreLogging /NoDefaultCtors/ 5 | { 6 | %TypeHeaderCode 7 | #define ROS_PACKAGE_NAME "rviz" 8 | #include 9 | %End 10 | 11 | public: 12 | /** @brief Configure Ogre to write output using the ROS logger. */ 13 | static void useRosLog(); 14 | 15 | /** @brief Configure Ogre to write output to the given log file 16 | * name. If file name is a relative path, it will be relative to 17 | * the directory which is current when the program is run. Default 18 | * is "Ogre.log". */ 19 | static void useLogFile( const QString& filename = "Ogre.log" ); 20 | 21 | /** @brief Disable Ogre logging entirely. This is the default. */ 22 | static void noLog(); 23 | }; 24 | 25 | }; 26 | -------------------------------------------------------------------------------- /src/python_bindings/sip/panel_dock_widget.sip: -------------------------------------------------------------------------------- 1 | namespace rviz 2 | { 3 | 4 | class PanelDockWidget: QDockWidget /NoDefaultCtors/ 5 | { 6 | %TypeHeaderCode 7 | #include 8 | %End 9 | 10 | public: 11 | PanelDockWidget( const QString& name ); 12 | 13 | void setContentWidget( QWidget* child ); 14 | 15 | signals: 16 | 17 | void visibilityChanged( bool ); 18 | 19 | }; 20 | 21 | }; 22 | -------------------------------------------------------------------------------- /src/python_bindings/sip/rviz.sip: -------------------------------------------------------------------------------- 1 | %Module librviz_sip 2 | 3 | %Import QtCore/QtCoremod.sip 4 | %Import QtGui/QtGuimod.sip 5 | %Import QtWidgets/QtWidgetsmod.sip 6 | 7 | %DefaultSupertype sip.simplewrapper 8 | 9 | %Include visualization_frame.sip 10 | %Include visualization_manager.sip 11 | %Include display.sip 12 | %Include display_group.sip 13 | %Include property.sip 14 | %Include bool_property.sip 15 | %Include panel_dock_widget.sip 16 | %Include view_controller.sip 17 | %Include view_manager.sip 18 | %Include tool.sip 19 | %Include tool_manager.sip 20 | %Include ogre_logging.sip 21 | %Include config.sip 22 | %Include yaml_config_writer.sip 23 | %Include yaml_config_reader.sip 24 | -------------------------------------------------------------------------------- /src/python_bindings/sip/yaml_config_reader.sip: -------------------------------------------------------------------------------- 1 | namespace rviz 2 | { 3 | 4 | class YamlConfigReader /NoDefaultCtors/ 5 | { 6 | %TypeHeaderCode 7 | #define ROS_PACKAGE_NAME "rviz" 8 | #include 9 | %End 10 | 11 | public: 12 | /** @brief Constructor. YamlConfigReader begins in an error state until a file or data string has been read successfully. */ 13 | YamlConfigReader(); 14 | 15 | /** @brief Read config data from a file. This potentially changes the return value sof error(), statusMessage(), and config(). */ 16 | void readFile( rviz::Config& config, const QString& filename ); 17 | 18 | /** @brief Read config data from a string. This potentially changes the return value sof error(), statusMessage(), and config(). */ 19 | void readString( rviz::Config& config, const QString& data, const QString& filename = "data string" ); 20 | 21 | /** @brief Read config data from a std::istream. This potentially changes the return value sof error(), statusMessage(), and config(). */ 22 | // void readStream( rviz::Config& config, std::istream& in, const QString& filename = "data stream" ); 23 | 24 | /** @brief Return true if the latest readFile() or readString() call had an error. */ 25 | bool error(); 26 | 27 | /** @brief Return an error message if the latest read call had an 28 | * error, or the empty string if there was no error. */ 29 | QString errorMessage(); 30 | }; 31 | 32 | }; 33 | -------------------------------------------------------------------------------- /src/python_bindings/sip/yaml_config_writer.sip: -------------------------------------------------------------------------------- 1 | namespace rviz 2 | { 3 | 4 | class YamlConfigWriter /NoDefaultCtors/ 5 | { 6 | %TypeHeaderCode 7 | #define ROS_PACKAGE_NAME "rviz" 8 | #include 9 | %End 10 | 11 | public: 12 | /** @brief Constructor. Writer starts in a non-error state with no status message. */ 13 | YamlConfigWriter(); 14 | 15 | /** @brief Write config data to a file. This potentially changes 16 | * the return values of error() and statusMessage(). */ 17 | void writeFile( const rviz::Config& config, const QString& filename ); 18 | 19 | /** @brief Write config data to a string, and return it. This 20 | * potentially changes the return values of error() and 21 | * statusMessage(). */ 22 | QString writeString( const rviz::Config& config, const QString& filename = "data string" ); 23 | 24 | /** @brief Write config data to a std::ostream. This potentially 25 | * changes the return values of error() and statusMessage(). */ 26 | // void writeStream( const rviz::Config& config, std::ostream& out, const QString& filename = "data stream" ); 27 | 28 | /** @brief Return true if the latest write operation had an error. */ 29 | bool error(); 30 | 31 | /** @brief Return an error message if the latest write call had an 32 | * error, or the empty string if there was no error. */ 33 | QString errorMessage(); 34 | }; 35 | 36 | }; 37 | -------------------------------------------------------------------------------- /src/rviz/bit_allocator.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | namespace rviz 33 | { 34 | BitAllocator::BitAllocator() : allocated_bits_(0) 35 | { 36 | } 37 | 38 | uint32_t BitAllocator::allocBit() 39 | { 40 | uint32_t mask = 1; 41 | for (int i = 0; i < 32; i++) 42 | { 43 | if ((mask & allocated_bits_) == 0) 44 | { 45 | allocated_bits_ |= mask; 46 | return mask; 47 | } 48 | 49 | mask <<= 1; 50 | } 51 | return 0; 52 | } 53 | 54 | void BitAllocator::freeBits(uint32_t bits) 55 | { 56 | allocated_bits_ &= ~bits; 57 | } 58 | 59 | } // end namespace rviz 60 | -------------------------------------------------------------------------------- /src/rviz/default_plugin/effort_visual.h: -------------------------------------------------------------------------------- 1 | #ifndef EFFORT_VISUAL_H 2 | #define EFFORT_VISUAL_H 3 | 4 | #include 5 | 6 | namespace rviz 7 | { 8 | class Arrow; 9 | class BillboardLine; 10 | } // namespace rviz 11 | 12 | namespace rviz 13 | { 14 | // Each instance of EffortVisual represents the visualization of a single 15 | // sensor_msgs::Effort message. Currently it just shows an arrow with 16 | // the direction and magnitude of the acceleration vector, but could 17 | // easily be expanded to include more of the message data. 18 | class EffortVisual 19 | { 20 | public: 21 | // Constructor. Creates the visual stuff and puts it into the 22 | // scene, but in an unconfigured state. 23 | EffortVisual(Ogre::SceneManager* scene_manager, Ogre::SceneNode* parent_node); 24 | 25 | // Destructor. Removes the visual stuff from the scene. 26 | virtual ~EffortVisual(); 27 | 28 | // set rainbow color 29 | void getRainbowColor(float value, Ogre::ColourValue& color); 30 | void setEffort(const std::string& joint_name, double effort, double max_effort); 31 | 32 | // set the pose of coordinates frame the each joint refers to. 33 | void setFramePosition(const std::string& joint_name, const Ogre::Vector3& position); 34 | void setFrameOrientation(const std::string& joint_name, const Ogre::Quaternion& orientation); 35 | 36 | void setFrameEnabled(const std::string& joint_name, const bool e); 37 | 38 | void setWidth(float w); 39 | 40 | void setScale(float s); 41 | 42 | private: 43 | // The object implementing the effort circle 44 | std::map effort_circle_; 45 | std::map effort_arrow_; 46 | std::map effort_enabled_; 47 | 48 | Ogre::SceneManager* scene_manager_; 49 | Ogre::SceneNode* parent_node_; 50 | 51 | std::map position_; 52 | std::map orientation_; 53 | 54 | float width_, scale_; 55 | }; 56 | 57 | } // end namespace rviz 58 | 59 | #endif // EFFORT_VISUAL_H 60 | -------------------------------------------------------------------------------- /src/rviz/default_plugin/interactive_markers/integer_action.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #include "integer_action.h" 30 | 31 | namespace rviz 32 | { 33 | IntegerAction::IntegerAction(const QString& text, QObject* parent, int id) 34 | : QAction(text, parent), id_(id) 35 | { 36 | connect(this, &QAction::triggered, this, &IntegerAction::emitId); 37 | } 38 | 39 | void IntegerAction::emitId() 40 | { 41 | Q_EMIT triggered(id_); 42 | } 43 | 44 | } // end namespace rviz 45 | -------------------------------------------------------------------------------- /src/rviz/default_plugin/point_display.h: -------------------------------------------------------------------------------- 1 | #ifndef POINT_DISPLAY_H 2 | #define POINT_DISPLAY_H 3 | 4 | #ifndef Q_MOC_RUN 5 | #include 6 | #endif 7 | 8 | #include 9 | #include 10 | 11 | 12 | namespace Ogre 13 | { 14 | class SceneNode; 15 | } 16 | 17 | namespace rviz 18 | { 19 | class ColorProperty; 20 | class FloatProperty; 21 | class IntProperty; 22 | } // namespace rviz 23 | 24 | namespace rviz 25 | { 26 | class PointStampedVisual; 27 | 28 | class PointStampedDisplay : public rviz::MessageFilterDisplay 29 | { 30 | Q_OBJECT 31 | public: 32 | // Constructor. pluginlib::ClassLoader creates instances by calling 33 | // the default constructor, so make sure you have one. 34 | PointStampedDisplay(); 35 | ~PointStampedDisplay() override; 36 | 37 | protected: 38 | // Overrides of public virtual functions from the Display class. 39 | void onInitialize() override; 40 | void reset() override; 41 | 42 | private Q_SLOTS: 43 | // Helper function to apply color and alpha to all visuals. 44 | void updateColorAndAlpha(); 45 | void updateHistoryLength(); 46 | 47 | // Function to handle an incoming ROS message. 48 | private: 49 | void processMessage(const geometry_msgs::PointStamped::ConstPtr& msg) override; 50 | 51 | // Storage for the list of visuals. It is a circular buffer where 52 | // data gets popped from the front (oldest) and pushed to the back (newest) 53 | boost::circular_buffer > visuals_; 54 | 55 | // Property objects for user-editable properties. 56 | rviz::ColorProperty* color_property_; 57 | rviz::FloatProperty *alpha_property_, *radius_property_; 58 | rviz::IntProperty* history_length_property_; 59 | }; 60 | } // namespace rviz 61 | 62 | #endif // POINT_DISPLAY_H 63 | -------------------------------------------------------------------------------- /src/rviz/default_plugin/point_visual.h: -------------------------------------------------------------------------------- 1 | #ifndef POINT_VISUAL_H 2 | #define POINT_VISUAL_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | namespace rviz 9 | { 10 | class Shape; 11 | } 12 | 13 | namespace rviz 14 | { 15 | // Each instance of PointStampedVisual represents the visualization of a single 16 | // sensor_msgs::Point message. Currently it just shows an arrow with 17 | // the direction and magnitude of the acceleration vector, but could 18 | // easily be expanded to include more of the message data. 19 | class PointStampedVisual 20 | { 21 | public: 22 | // Constructor. Creates the visual stuff and puts it into the 23 | // scene, but in an unconfigured state. 24 | PointStampedVisual(Ogre::SceneManager* scene_manager, Ogre::SceneNode* parent_node); 25 | 26 | // Destructor. Removes the visual stuff from the scene. 27 | virtual ~PointStampedVisual(); 28 | 29 | // set rainbow color 30 | void getRainbowColor(float value, Ogre::ColourValue& color); 31 | // Configure the visual to show the data in the message. 32 | void setMessage(const geometry_msgs::PointStamped::ConstPtr& msg); 33 | 34 | // Set the pose of the coordinate frame the message refers to. 35 | // These could be done inside setMessage(), but that would require 36 | // calls to FrameManager and error handling inside setMessage(), 37 | // which doesn't seem as clean. This way PointStampedVisual is only 38 | // responsible for visualization. 39 | void setFramePosition(const Ogre::Vector3& position); 40 | void setFrameOrientation(const Ogre::Quaternion& orientation); 41 | 42 | // Set the color and alpha of the visual, which are user-editable 43 | // parameters and therefore don't come from the Point message. 44 | void setColor(float r, float g, float b, float a); 45 | 46 | void setRadius(float r); 47 | 48 | private: 49 | // The object implementing the point circle 50 | rviz::Shape* point_; 51 | 52 | // A SceneNode whose pose is set to match the coordinate frame of 53 | // the Point message header. 54 | Ogre::SceneNode* frame_node_; 55 | 56 | // The SceneManager, kept here only so the destructor can ask it to 57 | // destroy the ``frame_node_``. 58 | Ogre::SceneManager* scene_manager_; 59 | 60 | float radius_; 61 | }; 62 | 63 | } // end namespace rviz 64 | 65 | #endif // POINT_VISUAL_H 66 | -------------------------------------------------------------------------------- /src/rviz/default_plugin/tools/move_tool.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_MOVE_TOOL_H 31 | #define RVIZ_MOVE_TOOL_H 32 | 33 | #include 34 | 35 | namespace rviz 36 | { 37 | class DisplayContext; 38 | 39 | class MoveTool : public Tool 40 | { 41 | public: 42 | MoveTool(); 43 | 44 | void activate() override 45 | { 46 | } 47 | void deactivate() override 48 | { 49 | } 50 | 51 | int processMouseEvent(ViewportMouseEvent& event) override; 52 | int processKeyEvent(QKeyEvent* event, RenderPanel* panel) override; 53 | }; 54 | 55 | } // namespace rviz 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/rviz/default_plugin/wrench_visual.h: -------------------------------------------------------------------------------- 1 | #ifndef WRENCHSTAMPED_VISUAL_H 2 | #define WRENCHSTAMPED_VISUAL_H 3 | 4 | #include 5 | #include "screw_visual.h" 6 | 7 | namespace rviz 8 | { 9 | // For API compatibility we provide the old WrenchVisual class as well 10 | class [[deprecated("Replace with ScrewVisual")]] WrenchVisual; 11 | class WrenchVisual : public ScrewVisual 12 | { 13 | public: 14 | using ScrewVisual::ScrewVisual; 15 | 16 | inline void setWrench(const Ogre::Vector3& force, const Ogre::Vector3& torque) 17 | { 18 | setScrew(force, torque); 19 | } 20 | inline void setWrench(const geometry_msgs::Wrench& wrench) 21 | { 22 | setScrew(wrench.force, wrench.torque); 23 | } 24 | 25 | inline void setForceColor(float r, float g, float b, float a) 26 | { 27 | setLinearColor(r, g, b, a); 28 | } 29 | inline void setTorqueColor(float r, float g, float b, float a) 30 | { 31 | setAngularColor(r, g, b, a); 32 | } 33 | inline void setForceScale(float s) 34 | { 35 | setLinearScale(s); 36 | } 37 | inline void setTorqueScale(float s) 38 | { 39 | setAngularScale(s); 40 | } 41 | }; 42 | 43 | } // end namespace rviz 44 | 45 | #endif // WRENCHSTAMPED_VISUAL_H 46 | -------------------------------------------------------------------------------- /src/rviz/env_config.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef RVIZ_ENV_CONFIG_H 30 | #define RVIZ_ENV_CONFIG_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | std::string get_version(); 37 | std::string get_distro(); 38 | std::string get_ogre_plugin_path(); 39 | } // namespace rviz 40 | 41 | #endif // RVIZ_ENV_CONFIG_H 42 | -------------------------------------------------------------------------------- /src/rviz/help_panel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef HELP_PANEL_H 30 | #define HELP_PANEL_H 31 | 32 | #include 33 | 34 | #include 35 | 36 | class QTextBrowser; 37 | 38 | namespace rviz 39 | { 40 | class HelpPanel : public Panel 41 | { 42 | Q_OBJECT 43 | public: 44 | HelpPanel(QWidget* parent = nullptr); 45 | ~HelpPanel() override; 46 | 47 | void onInitialize() override; 48 | 49 | /** @brief Load the given html file. */ 50 | void setHelpFile(const QString& file_path); 51 | 52 | private: 53 | QTextBrowser* browser_; 54 | }; 55 | 56 | } // end namespace rviz 57 | 58 | #endif // HELP_PANEL_H 59 | -------------------------------------------------------------------------------- /src/rviz/helpers/color.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_COLOR_H 31 | #define RVIZ_COLOR_H 32 | 33 | namespace rviz 34 | { 35 | struct Color 36 | { 37 | Color() : r_(0.0f), g_(0.0f), b_(0.0f) 38 | { 39 | } 40 | 41 | Color(float r, float g, float b) : r_(r), g_(g), b_(b) 42 | { 43 | } 44 | 45 | ~Color() 46 | { 47 | } 48 | 49 | float r_; 50 | float g_; 51 | float b_; 52 | }; 53 | 54 | } // namespace rviz 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/rviz/helpers/color.i: -------------------------------------------------------------------------------- 1 | %{ 2 | #include "helpers/color.h" 3 | %} 4 | 5 | %include "color.h" 6 | 7 | %init %{ 8 | 9 | %} 10 | -------------------------------------------------------------------------------- /src/rviz/helpers/tf_prefix.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2020, Bielefeld University 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Bielefeld University nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #pragma once 31 | #include 32 | 33 | namespace rviz 34 | { 35 | std::string concat(const std::string& prefix, const std::string& frame) 36 | { 37 | if (prefix.empty()) 38 | return frame; 39 | 40 | std::string composite = prefix; 41 | composite.append("/"); 42 | composite.append(frame); 43 | return composite; 44 | } 45 | 46 | } // namespace rviz 47 | -------------------------------------------------------------------------------- /src/rviz/image/mouse_click.h: -------------------------------------------------------------------------------- 1 | #ifndef RVIZ_MOUSE_CLICK_H 2 | #define RVIZ_MOUSE_CLICK_H 3 | 4 | #include 5 | 6 | #ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829 7 | #include 8 | #include 9 | #include 10 | 11 | #include 12 | 13 | #include "ros/ros.h" 14 | #include "geometry_msgs/PointStamped.h" 15 | #include "std_msgs/String.h" 16 | 17 | #include "rviz/rviz_export.h" 18 | #include "rviz/display.h" 19 | #endif 20 | 21 | 22 | namespace rviz 23 | { 24 | /** @brief Class for capturing mouse clicks. 25 | * 26 | * This class handles mouse clicking functionalities integrated into the ImageDisplay. 27 | * It uses a qt event filter to capture mouse clicks, handles image resizing and checks if the click was 28 | * inside or outside the image. It also scales the pixel coordinates to get them w.r.t. the image (not 29 | * the window) size. Mouse clicks image pixel coordinates are published as ros geometry_msgs 30 | * PointStamped. The z component is ignored. The topic name where the mouse clicks are published is 31 | * defined created after the subscribed image topic as: /mouse_click. 32 | */ 33 | 34 | class RVIZ_EXPORT MouseClick : QObject 35 | { 36 | public: 37 | MouseClick(QWidget* widget, const ros::NodeHandle& nh); 38 | 39 | void enable(); 40 | void disable(); 41 | 42 | void setDimensions(int img_width, int img_height, int win_width, int win_height); 43 | void setImageTopic(const QString& topic); 44 | 45 | private: 46 | virtual bool eventFilter(QObject* obj, QEvent* event); 47 | 48 | int img_width_, img_height_, win_width_, win_height_; // To assess if the clicks are inside the image. 49 | ros::NodeHandle node_handle_; 50 | ros::Publisher publisher_; 51 | std::string topic_; 52 | bool topic_name_ok_; 53 | }; 54 | 55 | } // namespace rviz 56 | #endif 57 | -------------------------------------------------------------------------------- /src/rviz/loading_dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2009, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_LOADING_DIALOG_H 31 | #define RVIZ_LOADING_DIALOG_H 32 | 33 | #include 34 | 35 | class QLabel; 36 | 37 | namespace rviz 38 | { 39 | class LoadingDialog : public QDialog 40 | { 41 | Q_OBJECT 42 | public: 43 | LoadingDialog(QWidget* parent = nullptr); 44 | 45 | public Q_SLOTS: 46 | void showMessage(const QString& message); 47 | 48 | protected: 49 | QLabel* label_; 50 | }; 51 | 52 | } // end namespace rviz 53 | 54 | #endif // RVIZ_LOADING_DIALOG_H 55 | -------------------------------------------------------------------------------- /src/rviz/main.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #include 33 | 34 | int main(int argc, char** argv) 35 | { 36 | QApplication qapp(argc, argv); 37 | 38 | rviz::VisualizerApp vapp; 39 | if (vapp.init(argc, argv)) 40 | { 41 | return qapp.exec(); 42 | } 43 | else 44 | { 45 | return 1; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/rviz/mesh_loader.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2010, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_MESH_LOADER_H 31 | #define RVIZ_MESH_LOADER_H 32 | 33 | #include 34 | #include 35 | 36 | namespace rviz 37 | { 38 | Ogre::MeshPtr loadMeshFromResource(const std::string& resource_path); 39 | Ogre::SkeletonPtr loadSkeletonFromResource(const std::string& resource_path); 40 | } // namespace rviz 41 | 42 | #endif // RVIZ_MESH_LOADER_H 43 | -------------------------------------------------------------------------------- /src/rviz/noetic_eol_dialog.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | namespace rviz 4 | { 5 | NoeticEOLDialog::NoeticEOLDialog(QWidget* parent) : QMessageBox(parent) 6 | { 7 | setIcon(QMessageBox::Critical); 8 | setTextFormat(Qt::RichText); 9 | setText( 10 | "

ROS Noetic goes end-of-life 2025-05-31.

" 11 | "

Users are encouraged to migrate to ROS 2 as soon as possible!" 12 | "Alternatively, switch to the ROS One " 13 | "distribution.

" 14 | "

For more information see this blog post.

" 15 | "

To disable this dialog, set the DISABLE_ROS1_EOL_WARNINGS environment " 16 | "variable.

"); 17 | setWindowTitle("ROS 1 End-of-Life is May 31st, 2025"); 18 | setStandardButtons(QMessageBox::Ok); 19 | } 20 | } // end namespace rviz 21 | -------------------------------------------------------------------------------- /src/rviz/noetic_eol_dialog.h: -------------------------------------------------------------------------------- 1 | #ifndef RVIZ_NOETIC_EOL_DIALOG_H 2 | #define RVIZ_NOETIC_EOL_DIALOG_H 3 | 4 | #include 5 | 6 | namespace rviz 7 | { 8 | class NoeticEOLDialog : public QMessageBox 9 | { 10 | Q_OBJECT 11 | public: 12 | NoeticEOLDialog(QWidget* parent = nullptr); 13 | }; 14 | 15 | } // end namespace rviz 16 | 17 | #endif // RVIZ_WAIT_FOR_MASTER_DIALOG_H 18 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/apply_visibility_bits.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef APPLY_VISIBILITY_BITS_H 30 | #define APPLY_VISIBILITY_BITS_H 31 | 32 | namespace Ogre 33 | { 34 | class SceneNode; 35 | } 36 | 37 | namespace rviz 38 | { 39 | void applyVisibilityBits(uint32_t bits, Ogre::SceneNode* node); 40 | 41 | } // end namespace rviz 42 | 43 | #endif // APPLY_VISIBILITY_BITS_H 44 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/initialization.cpp: -------------------------------------------------------------------------------- 1 | #include "initialization.h" 2 | 3 | #include 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | #include 10 | 11 | namespace rviz 12 | { 13 | void cleanupOgre() 14 | { 15 | delete Ogre::Root::getSingletonPtr(); 16 | } 17 | 18 | // This should be folded into RenderSystem, but it should work fine as 19 | // is, so I'm leaving it for now. 20 | void initializeResources(const V_string& resource_paths) 21 | { 22 | V_string::const_iterator path_it = resource_paths.begin(); 23 | V_string::const_iterator path_end = resource_paths.end(); 24 | for (; path_it != path_end; ++path_it) 25 | { 26 | Ogre::ResourceGroupManager::getSingleton().addResourceLocation( 27 | *path_it, "FileSystem", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME); 28 | } 29 | 30 | Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups(); 31 | } 32 | 33 | } // namespace rviz 34 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/initialization.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef OGRE_TOOLS_INITIALIZATION_H 31 | #define OGRE_TOOLS_INITIALIZATION_H 32 | 33 | #include 34 | #include 35 | #include 36 | 37 | namespace rviz 38 | { 39 | typedef std::vector V_string; 40 | void cleanupOgre(); 41 | void initializeResources(const V_string& resource_paths); 42 | 43 | } // namespace rviz 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/object.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include "object.h" 31 | 32 | namespace rviz 33 | { 34 | Object::Object(Ogre::SceneManager* scene_manager) : scene_manager_(scene_manager) 35 | { 36 | } 37 | 38 | } // namespace rviz 39 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/ogre_vector.h: -------------------------------------------------------------------------------- 1 | // OgrePrerequisites.h is needed for version_check to work 2 | #include 3 | #include 4 | #if OGRE_VERSION < OGRE_VERSION_CHECK(1, 12, 0) 5 | #include 6 | #else 7 | #include 8 | #endif 9 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/orthographic.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef OGRE_TOOLS_ORTHOGRAPHIC_H 31 | #define OGRE_TOOLS_ORTHOGRAPHIC_H 32 | 33 | namespace Ogre 34 | { 35 | class Matrix4; 36 | } 37 | 38 | namespace rviz 39 | { 40 | void buildScaledOrthoMatrix(Ogre::Matrix4& proj, 41 | float left, 42 | float right, 43 | float bottom, 44 | float top, 45 | float near, 46 | float far); 47 | } 48 | 49 | #endif 50 | -------------------------------------------------------------------------------- /src/rviz/ogre_helpers/version_check.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019, Bielefeld University 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of Bielefeld University nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef OGRE_HELPERS_VERSION_CHECK_H 30 | #define OGRE_HELPERS_VERSION_CHECK_H 31 | 32 | // For use like #if (OGRE_VERSION >= OGRE_VERSION_CHECK(1, 9, 0)) 33 | #define OGRE_VERSION_CHECK(major, minor, patch) ((major << 16) | (minor << 8) | (patch)) 34 | 35 | #endif // OGRE_HELPERS_VERSION_CHECK_H 36 | -------------------------------------------------------------------------------- /src/rviz/panel_factory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef PANEL_FACTORY_H 30 | #define PANEL_FACTORY_H 31 | 32 | #include 33 | #include 34 | 35 | namespace rviz 36 | { 37 | class PanelFactory : public PluginlibFactory 38 | { 39 | public: 40 | PanelFactory(); 41 | }; 42 | 43 | } // end namespace rviz 44 | 45 | #endif // PANEL_FACTORY_H 46 | -------------------------------------------------------------------------------- /src/rviz/preferences.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2018, Open Source Robotics Foundation, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_PREFERENCES_H 31 | #define RVIZ_PREFERENCES_H 32 | 33 | namespace rviz 34 | { 35 | struct Preferences 36 | { 37 | bool prompt_save_on_exit = true; 38 | }; 39 | 40 | } // namespace rviz 41 | 42 | #endif // RVIZ_PREFERENCES_H 43 | -------------------------------------------------------------------------------- /src/rviz/properties/combo_box.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | #include 32 | 33 | namespace rviz 34 | { 35 | // allow popup list to become larger than QCombBox itself 36 | void ComboBox::showPopup() 37 | { 38 | auto view = this->view(); 39 | view->setMinimumWidth(view->sizeHintForColumn(0)); 40 | QComboBox::showPopup(); 41 | } 42 | 43 | } // end namespace rviz 44 | -------------------------------------------------------------------------------- /src/rviz/properties/combo_box.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef COMBO_BOX_H 30 | #define COMBO_BOX_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class ComboBox : public QComboBox 37 | { 38 | Q_OBJECT 39 | Q_PROPERTY(QString currentText READ currentText USER true) 40 | public: 41 | using QComboBox::QComboBox; 42 | void showPopup() override; 43 | }; 44 | 45 | } // end namespace rviz 46 | 47 | #endif // COMBO_BOX_H 48 | -------------------------------------------------------------------------------- /src/rviz/properties/editable_combo_box.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef EDITABLE_COMBO_BOX_H 30 | #define EDITABLE_COMBO_BOX_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class EditableComboBox : public ComboBox 37 | { 38 | Q_OBJECT 39 | public: 40 | EditableComboBox(QWidget* parent = nullptr); 41 | 42 | protected: 43 | /** @brief If event is a tab key press, set the edit text to the 44 | * longest common prefix from the completer. */ 45 | bool event(QEvent* event) override; 46 | }; 47 | 48 | } // end namespace rviz 49 | 50 | #endif // EDITABLE_COMBO_BOX_H 51 | -------------------------------------------------------------------------------- /src/rviz/properties/float_edit.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef FLOAT_EDIT_H 30 | #define FLOAT_EDIT_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class FloatEdit : public QLineEdit 37 | { 38 | Q_OBJECT 39 | Q_PROPERTY(float value READ getValue WRITE setValue USER true) 40 | public: 41 | FloatEdit(QWidget* parent = nullptr); 42 | virtual float getValue() 43 | { 44 | return value_; 45 | } 46 | virtual void setValue(float new_value); 47 | 48 | private Q_SLOTS: 49 | void updateValue(); 50 | 51 | private: 52 | float value_; 53 | }; 54 | 55 | } // end namespace rviz 56 | 57 | #endif // FLOAT_EDIT_H 58 | -------------------------------------------------------------------------------- /src/rviz/properties/parse_color.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef PARSE_COLOR_H 30 | #define PARSE_COLOR_H 31 | 32 | #include 33 | #include 34 | 35 | #include 36 | 37 | namespace rviz 38 | { 39 | QColor parseColor(const QString& color_string); 40 | QString printColor(const QColor& color); 41 | QColor ogreToQt(const Ogre::ColourValue& ogre_color); 42 | Ogre::ColourValue qtToOgre(const QColor& qt_color); 43 | 44 | } // end namespace rviz 45 | 46 | #endif // PARSE_COLOR_H 47 | -------------------------------------------------------------------------------- /src/rviz/properties/string_property.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | namespace rviz 33 | { 34 | StringProperty::StringProperty(const QString& name, 35 | const QString& default_value, 36 | const QString& description, 37 | Property* parent) 38 | : Property(name, default_value, description, parent) 39 | { 40 | } 41 | 42 | } // end namespace rviz 43 | -------------------------------------------------------------------------------- /src/rviz/selection_panel.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_SELECTION_PANEL_H 31 | #define RVIZ_SELECTION_PANEL_H 32 | 33 | #include 34 | 35 | namespace rviz 36 | { 37 | class PropertyTreeWidget; 38 | 39 | class SelectionPanel : public Panel 40 | { 41 | Q_OBJECT 42 | public: 43 | SelectionPanel(QWidget* parent = nullptr); 44 | 45 | void onInitialize() override; 46 | 47 | private: 48 | PropertyTreeWidget* tree_widget_; 49 | }; 50 | 51 | } // namespace rviz 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/rviz/splash_screen.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_SPLASH_SCREEN_H 31 | #define RVIZ_SPLASH_SCREEN_H 32 | 33 | #include 34 | 35 | 36 | class QPainter; 37 | 38 | namespace rviz 39 | { 40 | class SplashScreen : public QSplashScreen 41 | { 42 | Q_OBJECT 43 | public: 44 | SplashScreen(const QPixmap& pixmap); 45 | 46 | public Q_SLOTS: 47 | void showMessage(const QString& message); 48 | }; 49 | 50 | } // end namespace rviz 51 | 52 | #endif // RVIZ_SPLASH_SCREEN_H 53 | -------------------------------------------------------------------------------- /src/rviz/wait_for_master_dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef RVIZ_WAIT_FOR_MASTER_DIALOG_H 30 | #define RVIZ_WAIT_FOR_MASTER_DIALOG_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class WaitForMasterDialog : public QMessageBox 37 | { 38 | Q_OBJECT 39 | public: 40 | WaitForMasterDialog(QWidget* parent = nullptr); 41 | 42 | private Q_SLOTS: 43 | void onTimer(); 44 | }; 45 | 46 | } // end namespace rviz 47 | 48 | #endif // RVIZ_WAIT_FOR_MASTER_DIALOG_H 49 | -------------------------------------------------------------------------------- /src/rviz/widget_geometry_change_detector.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | WidgetGeometryChangeDetector::WidgetGeometryChangeDetector(QObject* parent) : QObject(parent) 37 | { 38 | } 39 | 40 | bool WidgetGeometryChangeDetector::eventFilter(QObject* watched, QEvent* event) 41 | { 42 | if (event->type() == QEvent::Move || event->type() == QEvent::Resize) 43 | { 44 | Q_EMIT changed(); 45 | } 46 | return QObject::eventFilter(watched, event); 47 | } 48 | 49 | } // end namespace rviz 50 | -------------------------------------------------------------------------------- /src/rviz/windows_compat.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021, Tobias Fischer, Queensland University of Technology 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Queensland Uni of Technology nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef WINDOWS_COMPAT_H 31 | #define WINDOWS_COMPAT_H 32 | 33 | #ifdef _WIN32 34 | 35 | #ifdef ERROR 36 | #undef ERROR 37 | #endif 38 | 39 | #ifdef DELETE 40 | #undef DELETE 41 | #endif 42 | 43 | #endif // _WIN32 44 | 45 | #endif // WINDOWS_COMPAT_H 46 | -------------------------------------------------------------------------------- /src/test/big-font.style: -------------------------------------------------------------------------------- 1 | * { 2 | font: 30px; 3 | } 4 | -------------------------------------------------------------------------------- /src/test/big-menus.style: -------------------------------------------------------------------------------- 1 | QMenu::item { 2 | padding: 20px; 3 | color: white; 4 | } 5 | 6 | QMenu::item:selected { 7 | background: #6a5b54; 8 | } 9 | -------------------------------------------------------------------------------- /src/test/color_editor_test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #include 33 | #include 34 | 35 | using namespace rviz; 36 | 37 | int main(int argc, char** argv) 38 | { 39 | QApplication app(argc, argv); 40 | 41 | ColorProperty prop("foo"); 42 | ColorEditor ce(&prop); 43 | ce.setText(prop.getName()); 44 | ce.resize(200, 40); 45 | ce.show(); 46 | 47 | return app.exec(); 48 | } 49 | -------------------------------------------------------------------------------- /src/test/cycling_frame.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Test script to publish a "cycling_frame" that rotates about the origin 3 | 4 | import math 5 | import rospy 6 | import tf2_ros 7 | import geometry_msgs.msg 8 | 9 | rospy.init_node("tf2_cycling_frame_broadcaster") 10 | broadcaster = tf2_ros.TransformBroadcaster() 11 | rate = rospy.Rate(30) 12 | 13 | msg = geometry_msgs.msg.TransformStamped() 14 | msg.header.frame_id = "base_link" 15 | msg.child_frame_id = "cycling_frame" 16 | t = 0 17 | 18 | while not rospy.is_shutdown(): 19 | msg.header.stamp = rospy.Time.now() 20 | msg.transform.translation.x = math.cos(t) 21 | msg.transform.translation.y = math.sin(t) 22 | msg.transform.rotation.w = math.cos(t / 2) 23 | msg.transform.rotation.z = math.sin(t / 2) 24 | broadcaster.sendTransform(msg) 25 | t += 0.01 26 | rate.sleep() 27 | -------------------------------------------------------------------------------- /src/test/display_test.test: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /src/test/embedded_materials_with_stl.yaml: -------------------------------------------------------------------------------- 1 | markers: 2 | - header: { seq: 0, stamp: { secs: 0, nsecs: 0 }, frame_id: base_link } 3 | ns: chunk 4 | id: 0 5 | type: 10 6 | action: 0 7 | pose: 8 | position: { x: 0, y: 0, z: 0 } 9 | orientation: { x: 0, y: 0, z: 0, w: 0 } 10 | color: { r: 1, g: 1, b: 0, a: 1 } 11 | scale: { x: .01, y: .01, z: .01 } 12 | frame_locked: False 13 | mesh_resource: "package://rviz/src/test/meshes/ax12_box.stl" 14 | mesh_use_embedded_materials: True 15 | - header: { seq: 0, stamp: { secs: 0, nsecs: 0 }, frame_id: base_link } 16 | ns: chunk 17 | id: 1 18 | type: 10 19 | action: 0 20 | pose: 21 | position: { x: 1, y: 0, z: 0 } 22 | orientation: { x: 0, y: 0, z: 0, w: 0 } 23 | color: { r: 1, g: 1, b: 0, a: 1 } 24 | scale: { x: .01, y: .01, z: .01 } 25 | frame_locked: False 26 | mesh_resource: "package://rviz/src/test/meshes/ax12_box.stl" 27 | mesh_use_embedded_materials: False 28 | - header: { seq: 0, stamp: { secs: 0, nsecs: 0 }, frame_id: base_link } 29 | ns: chunk 30 | id: 2 31 | type: 10 32 | action: 0 33 | pose: 34 | position: { x: 0, y: 1, z: 0 } 35 | orientation: { x: 0, y: 0, z: 0, w: 0 } 36 | color: { r: 1, g: 1, b: 0, a: 1 } 37 | scale: { x: 1, y: 1, z: 1 } 38 | frame_locked: False 39 | mesh_resource: "package://rviz/src/test/meshes/pr2-base.dae" 40 | mesh_use_embedded_materials: True 41 | - header: { seq: 0, stamp: { secs: 0, nsecs: 0 }, frame_id: base_link } 42 | ns: chunk 43 | id: 3 44 | type: 10 45 | action: 0 46 | pose: 47 | position: { x: 1, y: 1, z: 0 } 48 | orientation: { x: 0, y: 0, z: 0, w: 0 } 49 | color: { r: 1, g: 1, b: 0, a: 1 } 50 | scale: { x: 1, y: 1, z: 1 } 51 | frame_locked: False 52 | mesh_resource: "package://rviz/src/test/meshes/pr2-base.dae" 53 | mesh_use_embedded_materials: False 54 | -------------------------------------------------------------------------------- /src/test/image_test.cpp: -------------------------------------------------------------------------------- 1 | #include "ros/ros.h" 2 | 3 | #include "sensor_msgs/Image.h" 4 | 5 | int main(int argc, char** argv) 6 | { 7 | ros::init(argc, argv, "image_test"); 8 | 9 | ros::NodeHandle n; 10 | 11 | ros::Publisher rgb_pub = n.advertise("red_image", 0); 12 | 13 | ros::Duration(0.1).sleep(); 14 | 15 | sensor_msgs::Image red_image; 16 | red_image.header.frame_id = "base_link"; 17 | red_image.header.stamp = ros::Time::now(); 18 | red_image.height = 100; 19 | red_image.width = 100; 20 | red_image.encoding = "rgb8"; 21 | red_image.step = 3 * red_image.height; 22 | 23 | red_image.data.resize(3 * red_image.height * red_image.width); 24 | for (uint32_t i = 0; i < 3 * red_image.height * red_image.width; ++i) 25 | { 26 | if (i % 3 == 0) 27 | { 28 | red_image.data[i] = 255; 29 | } 30 | else 31 | { 32 | red_image.data[i] = 0; 33 | } 34 | } 35 | 36 | int i = 0; 37 | while (n.ok()) 38 | { 39 | ROS_INFO("Publishing"); 40 | 41 | rgb_pub.publish(red_image); 42 | 43 | ++i; 44 | 45 | ros::Duration(1.0).sleep(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/test/kitchen-mesh-marker.yaml: -------------------------------------------------------------------------------- 1 | header: { seq: 0, stamp: { secs: 0, nsecs: 0 }, frame_id: base_link } 2 | ns: chunk 3 | id: 0 4 | type: 10 5 | action: 0 6 | pose: 7 | position: { x: 0, y: 0, z: 0 } 8 | orientation: { x: 0, y: 0, z: 0, w: 1 } 9 | color: { r: 1, g: 1, b: 1, a: 1 } 10 | scale: { x: 1, y: 1, z: 1 } 11 | frame_locked: False 12 | mesh_resource: 'package://rviz/src/test/meshes/kitchen/models/dada.dae' 13 | mesh_use_embedded_materials: True 14 | -------------------------------------------------------------------------------- /src/test/line_edit_with_button_test.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #include 33 | 34 | using namespace rviz; 35 | 36 | int main(int argc, char** argv) 37 | { 38 | QApplication app(argc, argv); 39 | 40 | LineEditWithButton lewb; 41 | lewb.resize(200, 50); 42 | lewb.show(); 43 | 44 | return app.exec(); 45 | } 46 | -------------------------------------------------------------------------------- /src/test/map_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from nav_msgs.msg import OccupancyGrid 4 | import rospy 5 | import math 6 | 7 | topic = "moving_map" 8 | publisher = rospy.Publisher(topic, OccupancyGrid) 9 | 10 | rospy.init_node("map_test") 11 | 12 | grid = OccupancyGrid() 13 | 14 | t = 0 15 | 16 | while not rospy.is_shutdown(): 17 | grid.header.frame_id = "map" 18 | grid.header.stamp = rospy.Time.now() 19 | grid.info.map_load_time = rospy.Time.now() 20 | grid.info.resolution = 1.0 21 | grid.info.width = 3 22 | grid.info.height = 3 23 | grid.info.origin.position.x = math.cos(t) 24 | grid.info.origin.position.y = math.sin(t) 25 | grid.info.origin.orientation.w = 1.0 26 | grid.data = [0, 20, 40, 60, 80, 100, 120, -10, -100] 27 | 28 | # Publish the MarkerArray 29 | publisher.publish(grid) 30 | 31 | rospy.sleep(0.05) 32 | t += 0.1 33 | -------------------------------------------------------------------------------- /src/test/marker_array_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from visualization_msgs.msg import Marker 4 | from visualization_msgs.msg import MarkerArray 5 | import rospy 6 | import math 7 | 8 | topic = "visualization_marker_array" 9 | publisher = rospy.Publisher(topic, MarkerArray) 10 | 11 | rospy.init_node("register") 12 | 13 | markerArray = MarkerArray() 14 | 15 | count = 0 16 | MARKERS_MAX = 100 17 | 18 | while not rospy.is_shutdown(): 19 | 20 | marker = Marker() 21 | marker.header.frame_id = "base_link" 22 | marker.type = marker.SPHERE 23 | marker.action = marker.ADD 24 | marker.scale.x = 0.2 25 | marker.scale.y = 0.2 26 | marker.scale.z = 0.2 27 | marker.color.a = 1.0 28 | marker.color.r = 1.0 29 | marker.color.g = 1.0 30 | marker.color.b = 0.0 31 | marker.pose.orientation.w = 1.0 32 | marker.pose.position.x = math.cos(count / 50.0) 33 | marker.pose.position.y = math.cos(count / 40.0) 34 | marker.pose.position.z = math.cos(count / 30.0) 35 | 36 | # We add the new marker to the MarkerArray, removing the oldest marker from it when necessary 37 | if count > MARKERS_MAX: 38 | markerArray.markers.pop(0) 39 | 40 | markerArray.markers.append(marker) 41 | 42 | # Renumber the marker IDs 43 | id = 0 44 | for m in markerArray.markers: 45 | m.id = id 46 | id += 1 47 | 48 | # Publish the MarkerArray 49 | publisher.publish(markerArray) 50 | 51 | count += 1 52 | 53 | rospy.sleep(0.01) 54 | -------------------------------------------------------------------------------- /src/test/meshes/16bit_vs_32bit_should_fail.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/16bit_vs_32bit_should_fail.stl -------------------------------------------------------------------------------- /src/test/meshes/F10.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/F10.stl -------------------------------------------------------------------------------- /src/test/meshes/F2.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/F2.stl -------------------------------------------------------------------------------- /src/test/meshes/F3.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/F3.stl -------------------------------------------------------------------------------- /src/test/meshes/F4.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/F4.stl -------------------------------------------------------------------------------- /src/test/meshes/README: -------------------------------------------------------------------------------- 1 | The meshes for these parts were created by I-Bioloid and obtain from: 2 | http://www.thingiverse.com/thing:5192 3 | -------------------------------------------------------------------------------- /src/test/meshes/ax12_box.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/ax12_box.stl -------------------------------------------------------------------------------- /src/test/meshes/base_color.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/base_color.tif -------------------------------------------------------------------------------- /src/test/meshes/base_normals.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/base_normals.tif -------------------------------------------------------------------------------- /src/test/meshes/finger.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/finger.stl -------------------------------------------------------------------------------- /src/test/meshes/invalid.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/invalid.stl -------------------------------------------------------------------------------- /src/test/meshes/invalid_end_tags.stl: -------------------------------------------------------------------------------- 1 | solid ascii.stl 2 | 3 | facet normal 0.648000e-001 0.648000e-002 0.648000e-003 4 | outer loop 5 | vertex 1.648000e-001 2.648000e-002 3.648000e-003 6 | vertex 4.648000e-001 5.648000e-002 6.648000e-003 7 | vertex 7.648000e-001 8.648000e-002 9.648000e-003 8 | end loop 9 | end facet 10 | 11 | facet normal 4.648000e-001 4.648000e-002 4.648000e-003 12 | outer loop 13 | vertex 10.648000e-001 11.648000e-002 12.648000e-003 14 | vertex 13.648000e-001 14.648000e-002 15.648000e-003 15 | vertex 16.648000e-001 17.648000e-002 18.648000e-003 16 | end loop 17 | end facet 18 | 19 | endsolid ascii.stl 20 | -------------------------------------------------------------------------------- /src/test/meshes/invalid_extra.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/invalid_extra.stl -------------------------------------------------------------------------------- /src/test/meshes/invalid_short.stl: -------------------------------------------------------------------------------- 1 | Binary STL file -------------------------------------------------------------------------------- /src/test/meshes/kitchen/doc.kml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | dada 5 | Google SketchUp 6.4.112]]> 6 | SketchUp 7 | 1 8 | 9 | 268.621 10 | 81.6735 11 | 40.01701040206847 12 | -105.2828779909634 13 | 6.259231800506925 14 | 0.9128535643034782 15 | 16 | 17 | Tour 18 | 19 | Camera 20 | 1 21 | 22 | 268.621 23 | 81.6735 24 | 40.01701040206847 25 | -105.2828779909634 26 | 6.259231800506925 27 | 0.9128535643034782 28 | 29 | 30 | 31 | 32 | Model 33 | 34 | 36 | 37 | relativeToGround 38 | 39 | -105.283000000000 40 | 40.017000000000 41 | 0.000000000000 42 | 43 | 44 | 0 45 | 0 46 | 0 47 | 48 | 49 | 1.0 50 | 1.0 51 | 1.0 52 | 53 | 54 | models/dada.dae 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture0.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture1.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture2.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture3.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture4.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture5.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/images/texture6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/kitchen/images/texture6.jpg -------------------------------------------------------------------------------- /src/test/meshes/kitchen/textures.txt: -------------------------------------------------------------------------------- 1 | <../images/texture0.jpg> <../images/texture0.jpg> 2 | <../images/texture1.jpg> <../images/texture1.jpg> 3 | <../images/texture2.jpg> <../images/texture2.jpg> 4 | <../images/texture3.jpg> <../images/texture3.jpg> 5 | <../images/texture4.jpg> <../images/texture4.jpg> 6 | <../images/texture5.jpg> <../images/texture5.jpg> 7 | <../images/texture6.jpg> <../images/texture6.jpg> 8 | -------------------------------------------------------------------------------- /src/test/meshes/valid.stl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ros-visualization/rviz/c4964de840d97b1377456a2054662551816b0a54/src/test/meshes/valid.stl -------------------------------------------------------------------------------- /src/test/meshes/valid_ascii.stl: -------------------------------------------------------------------------------- 1 | solid valid_ascii.stl 2 | facet normal 1.240347e-01 -9.922779e-01 0.000000e+00 3 | outer loop 4 | vertex 1.648000e-01 2.648000e-02 3.648000e-03 5 | vertex 4.648000e-01 5.648000e-02 6.648000e-03 6 | vertex 7.648000e-01 8.648000e-02 9.648000e-03 7 | endloop 8 | endfacet 9 | facet normal 0.000000e+00 6.237829e-02 -9.980526e-01 10 | outer loop 11 | vertex 1.064800e+00 1.164800e-01 1.264800e-02 12 | vertex 1.364800e+00 1.464800e-01 1.564800e-02 13 | vertex 16.64800e-001 1.764800e-01 1.864800e-02 14 | endloop 15 | endfacet 16 | endsolid valid_ascii.stl 17 | -------------------------------------------------------------------------------- /src/test/mock_context.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include "mock_display_factory.h" 31 | 32 | #include "mock_context.h" 33 | 34 | namespace rviz 35 | { 36 | MockContext::MockContext() : display_factory_(new MockDisplayFactory) 37 | { 38 | } 39 | 40 | } // end namespace rviz 41 | -------------------------------------------------------------------------------- /src/test/mock_display.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef MOCK_DISPLAY_H 30 | #define MOCK_DISPLAY_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class VectorProperty; 37 | class ColorProperty; 38 | 39 | class MockDisplay : public Display 40 | { 41 | Q_OBJECT 42 | public: 43 | MockDisplay(); 44 | 45 | Property* count_; 46 | Property* style_; 47 | Property* pi_; 48 | VectorProperty* offset_; 49 | ColorProperty* color_; 50 | }; 51 | 52 | } // end namespace rviz 53 | 54 | #endif // MOCK_DISPLAY_H 55 | -------------------------------------------------------------------------------- /src/test/mock_display_factory.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef MOCK_DISPLAY_FACTORY_H 30 | #define MOCK_DISPLAY_FACTORY_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class MockDisplayFactory : public DisplayFactory 37 | { 38 | protected: 39 | virtual Display* makeRaw(const QString& class_id, QString* error_return = NULL); 40 | }; 41 | 42 | } // end namespace rviz 43 | 44 | #endif // MOCK_DISPLAY_FACTORY_H 45 | -------------------------------------------------------------------------------- /src/test/mock_property_change_receiver.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #include "mock_property_change_receiver.h" 33 | 34 | namespace rviz 35 | { 36 | void MockPropertyChangeReceiver::aboutToChange() 37 | { 38 | if (Property* p = qobject_cast(sender())) 39 | result += " aboutToChange, v=" + p->getValue().toString(); 40 | } 41 | 42 | void MockPropertyChangeReceiver::changed() 43 | { 44 | if (Property* p = qobject_cast(sender())) 45 | result += " changed, v=" + p->getValue().toString(); 46 | } 47 | 48 | } // end namespace rviz 49 | -------------------------------------------------------------------------------- /src/test/mock_property_change_receiver.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | #ifndef MOCK_PROPERTY_CHANGE_RECEIVER_H 30 | #define MOCK_PROPERTY_CHANGE_RECEIVER_H 31 | 32 | #include 33 | 34 | namespace rviz 35 | { 36 | class MockPropertyChangeReceiver : public QObject 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | QString result; 42 | 43 | void reset() 44 | { 45 | result = ""; 46 | } 47 | 48 | public Q_SLOTS: 49 | void aboutToChange(); 50 | void changed(); 51 | }; 52 | 53 | } // end namespace rviz 54 | 55 | #endif // MOCK_PROPERTY_CHANGE_RECEIVER_H 56 | -------------------------------------------------------------------------------- /src/test/posearray.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from geometry_msgs.msg import Pose 4 | from geometry_msgs.msg import PoseArray 5 | import rospy 6 | 7 | topic = "test_poses" 8 | publisher = rospy.Publisher(topic, PoseArray) 9 | 10 | rospy.init_node("posearray") 11 | 12 | while not rospy.is_shutdown(): 13 | 14 | ps = PoseArray() 15 | ps.header.frame_id = "base_link" 16 | ps.header.stamp = rospy.Time.now() 17 | 18 | pose = Pose() 19 | pose.position.x = 2 20 | pose.position.y = 2 21 | pose.position.z = 0 22 | pose.orientation.x = 0 23 | pose.orientation.y = 0 24 | pose.orientation.z = 0.7071 25 | pose.orientation.w = 0.7071 26 | 27 | ps.poses.append(pose) 28 | 29 | pose = Pose() 30 | pose.position.x = 1 31 | pose.position.y = 1 32 | pose.position.z = 0 33 | pose.orientation.x = 0 34 | pose.orientation.y = 0 35 | pose.orientation.z = 0 36 | pose.orientation.w = 1 37 | 38 | ps.poses.append(pose) 39 | 40 | publisher.publish(ps) 41 | 42 | rospy.sleep(0.1) 43 | -------------------------------------------------------------------------------- /src/test/publish_test_map.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import rospy 4 | import numpy 5 | 6 | from nav_msgs.msg import OccupancyGrid 7 | 8 | pub = rospy.Publisher("test_map", OccupancyGrid, latch=True) 9 | rospy.init_node("test_map") 10 | 11 | _map = OccupancyGrid() 12 | _map.header.stamp = rospy.get_rostime() 13 | _map.header.frame_id = "map" 14 | _map.info.resolution = 0.1 15 | _map.info.width = 16 16 | _map.info.height = 16 17 | _map.info.origin.orientation.w = 1 18 | _map.data = [numpy.int8(x) for x in range(256)] 19 | 20 | pub.publish(_map) 21 | 22 | rospy.spin() 23 | -------------------------------------------------------------------------------- /src/test/ros_spinner.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #include 31 | 32 | #include "ros_spinner.h" 33 | 34 | RosSpinner::RosSpinner() 35 | { 36 | QTimer* timer = new QTimer(this); 37 | connect(timer, SIGNAL(timeout()), this, SLOT(onTimer())); 38 | timer->start(10); 39 | } 40 | 41 | void RosSpinner::onTimer() 42 | { 43 | if (ros::ok()) 44 | { 45 | ros::spinOnce(); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/test/ros_spinner.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2011, Willow Garage, Inc. 3 | * All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions are met: 7 | * 8 | * * Redistributions of source code must retain the above copyright 9 | * notice, this list of conditions and the following disclaimer. 10 | * * Redistributions in binary form must reproduce the above copyright 11 | * notice, this list of conditions and the following disclaimer in the 12 | * documentation and/or other materials provided with the distribution. 13 | * * Neither the name of the Willow Garage, Inc. nor the names of its 14 | * contributors may be used to endorse or promote products derived from 15 | * this software without specific prior written permission. 16 | * 17 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20 | * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 21 | * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27 | * POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #ifndef RVIZ_TEST_ROS_SPINNER_H 31 | #define RVIZ_TEST_ROS_SPINNER_H 32 | 33 | #include 34 | 35 | #ifndef Q_MOC_RUN // See: https://bugreports.qt-project.org/browse/QTBUG-22829 36 | #include 37 | #endif 38 | 39 | class RosSpinner : public QObject 40 | { 41 | Q_OBJECT 42 | public: 43 | RosSpinner(); 44 | 45 | private Q_SLOTS: 46 | void onTimer(); 47 | }; 48 | 49 | #endif // RVIZ_TEST_ROS_SPINNER_H 50 | -------------------------------------------------------------------------------- /src/test/sample_file.yaml: -------------------------------------------------------------------------------- 1 | Enabled: true 2 | Displays: 3 | - 4 | Class: MockDisplay 5 | Name: Steven 6 | Enabled: false 7 | Count: 17 8 | Style: a b c d e !@#$%^:& 9 | Offset: 10 | X: 1 11 | Y: 2 12 | Z: 1000.1 13 | Color: orange 14 | - 15 | Name: sub group 16 | Class: DisplayGroup 17 | Enabled: true 18 | Displays: 19 | - 20 | Name: sub group 21 | Class: DisplayGroup 22 | Enabled: true 23 | Displays: 24 | - 25 | Name: sub group 26 | Class: DisplayGroup 27 | Enabled: true 28 | Displays: 29 | - 30 | Name: sub group 31 | Class: DisplayGroup 32 | Enabled: true 33 | Displays: 34 | - 35 | Class: MockDisplay 36 | Name: Curly 37 | Enabled: false 38 | Count: 9000 39 | - 40 | Class: BrokenDisplay 41 | Name: Joe 42 | Enabled: true 43 | Count: 33 44 | - 45 | Class: BrokenDisplay 46 | Name: Joe 47 | Enabled: true 48 | Count: 33 49 | - 50 | Class: BrokenDisplay 51 | Name: Joe 52 | Enabled: true 53 | Count: 33 54 | -------------------------------------------------------------------------------- /src/test/send_bad_pc2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # This program publishes a pointcloud2 which has much shorter data 4 | # than what is described by width, height, and point_step. RViz 5 | # should catch this and show an error instead of crashing. 6 | 7 | import rospy 8 | from sensor_msgs.msg import PointCloud2 9 | from sensor_msgs.msg import PointField 10 | 11 | rospy.init_node("bad_pointcloud_publisher") 12 | 13 | pfx = PointField() 14 | pfx.name = "x" 15 | pfx.offset = 0 16 | pfx.datatype = 7 17 | pfx.count = 1 18 | 19 | pfy = PointField() 20 | pfy.name = "y" 21 | pfy.offset = 4 22 | pfy.datatype = 7 23 | pfy.count = 1 24 | 25 | pfz = PointField() 26 | pfz.name = "z" 27 | pfz.offset = 8 28 | pfz.datatype = 7 29 | pfz.count = 1 30 | 31 | pc = PointCloud2() 32 | 33 | pc.header.frame_id = "map" 34 | pc.header.stamp = rospy.Time.now() 35 | 36 | pc.fields = [pfx, pfy, pfz] 37 | pc.data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] 38 | pc.width = 10 39 | pc.height = 10 40 | pc.point_step = 12 41 | pc.row_step = 120 42 | pc.is_dense = False 43 | 44 | pub = rospy.Publisher("bad_pointcloud", PointCloud2) 45 | 46 | while not rospy.is_shutdown(): 47 | print("publishing bad PointCloud2.") 48 | pub.publish(pc) 49 | rospy.sleep(1.0) 50 | -------------------------------------------------------------------------------- /src/test/send_efforts.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from sensor_msgs.msg import JointState 4 | from math import pi, sin 5 | import rospy 6 | 7 | topic = "joint_states" 8 | publisher = rospy.Publisher(topic, JointState, queue_size=1) 9 | rospy.init_node("send_efforts") 10 | 11 | t = 0 12 | msg = JointState() 13 | msg.name = [ 14 | "panda_joint1", 15 | "panda_joint2", 16 | "panda_joint3", 17 | "panda_joint4", 18 | "panda_joint5", 19 | "panda_joint6", 20 | "panda_joint7", 21 | "panda_finger_joint1", 22 | ] 23 | N = len(msg.name) 24 | msg.position = [0.0 for i in range(N)] 25 | 26 | while not rospy.is_shutdown(): 27 | msg.header.stamp = rospy.Time.now() 28 | msg.effort = [10.0 * sin(t) for i in range(N)] 29 | publisher.publish(msg) 30 | t = t + 0.1 31 | rospy.sleep(0.1) 32 | -------------------------------------------------------------------------------- /src/test/send_odometry.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from nav_msgs.msg import Odometry 4 | import rospy 5 | 6 | topic = "test_odometry" 7 | publisher = rospy.Publisher(topic, Odometry) 8 | 9 | rospy.init_node("send_odometry") 10 | 11 | y = 0 12 | while not rospy.is_shutdown(): 13 | 14 | odo = Odometry() 15 | odo.header.frame_id = "base_link" 16 | odo.header.stamp = rospy.Time.now() 17 | 18 | odo.pose.pose.position.x = 0 19 | odo.pose.pose.position.y = y 20 | odo.pose.pose.position.z = 0 21 | 22 | odo.pose.pose.orientation.x = 0 23 | odo.pose.pose.orientation.y = 0 24 | odo.pose.pose.orientation.z = 0 25 | odo.pose.pose.orientation.w = 1 26 | 27 | publisher.publish(odo) 28 | 29 | y = y + 0.2 30 | if y > 5: 31 | y = -5 32 | 33 | rospy.sleep(0.1) 34 | -------------------------------------------------------------------------------- /src/test/send_path.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from nav_msgs.msg import Path 4 | from geometry_msgs.msg import PoseStamped 5 | import math 6 | import rospy 7 | import tf.transformations as tf 8 | 9 | topic = "test_path" 10 | publisher = rospy.Publisher(topic, Path, queue_size=1) 11 | 12 | rospy.init_node("send_path") 13 | 14 | t = 0 15 | rate = rospy.Rate(30) 16 | timestep = rate.sleep_dur.to_sec() 17 | while not rospy.is_shutdown(): 18 | 19 | p = Path() 20 | p.header.frame_id = "base_link" 21 | p.header.stamp = rospy.Time.now() 22 | 23 | num_points = 50 24 | for i in range(0, num_points): 25 | ps = PoseStamped() 26 | ps.header.stamp = p.header.stamp 27 | ps.header.frame_id = p.header.frame_id 28 | ps.pose.position.x = 10.0 * i / (num_points - 1) - 5 29 | ps.pose.position.y = math.sin(10.0 * i / num_points + t) 30 | ps.pose.position.z = 0 31 | angle = 2 * math.pi * i / num_points + t 32 | quat = tf.quaternion_from_euler(angle, 0, 0) 33 | ps.pose.orientation.x = quat[0] 34 | ps.pose.orientation.y = quat[1] 35 | ps.pose.orientation.z = quat[2] 36 | ps.pose.orientation.w = quat[3] 37 | p.poses.append(ps) 38 | 39 | publisher.publish(p) 40 | 41 | t += timestep 42 | rate.sleep() 43 | -------------------------------------------------------------------------------- /src/test/send_point.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from geometry_msgs.msg import PointStamped 4 | import math 5 | import rospy 6 | 7 | topic = "test_point" 8 | publisher = rospy.Publisher(topic, PointStamped) 9 | 10 | rospy.init_node("send_point") 11 | 12 | t = 0 13 | while not rospy.is_shutdown(): 14 | 15 | p = PointStamped() 16 | p.header.frame_id = "base_link" 17 | p.header.stamp = rospy.Time.now() 18 | 19 | r = 5.0 20 | p.point.x = r * math.cos(t) 21 | p.point.y = r * math.sin(t) 22 | p.point.z = 0 23 | 24 | publisher.publish(p) 25 | 26 | t += 0.1 27 | 28 | rospy.sleep(0.03) 29 | -------------------------------------------------------------------------------- /src/test/send_point_cloud_2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | # This program publishes a pointcloud2 to test rviz rendering 4 | 5 | from __future__ import print_function 6 | 7 | import rospy 8 | import numpy as np 9 | from sensor_msgs import point_cloud2 10 | from sensor_msgs.msg import PointCloud2 11 | from sensor_msgs.msg import PointField 12 | from std_msgs.msg import Header 13 | 14 | width = 100 15 | height = 100 16 | 17 | 18 | def publishPC2(count): 19 | fields = [ 20 | PointField("x", 0, PointField.FLOAT32, 1), 21 | PointField("y", 4, PointField.FLOAT32, 1), 22 | PointField("z", 8, PointField.FLOAT32, 1), 23 | PointField("intensity", 12, PointField.FLOAT32, 1), 24 | ] 25 | 26 | header = Header() 27 | header.frame_id = "map" 28 | header.stamp = rospy.Time.now() 29 | 30 | x, y = np.meshgrid(np.linspace(-2, 2, width), np.linspace(-2, 2, height)) 31 | z = 0.5 * np.sin(2 * x - count / 10.0) * np.sin(2 * y) 32 | points = np.array([x, y, z, z]).reshape(4, -1).T 33 | 34 | pc2 = point_cloud2.create_cloud(header, fields, points) 35 | pub.publish(pc2) 36 | 37 | 38 | if __name__ == "__main__": 39 | rospy.init_node("pc2_publisher") 40 | pub = rospy.Publisher("points2", PointCloud2, queue_size=100) 41 | rate = rospy.Rate(10) 42 | 43 | count = 0 44 | while not rospy.is_shutdown(): 45 | publishPC2(count) 46 | count += 1 47 | rate.sleep() 48 | -------------------------------------------------------------------------------- /src/test/send_polygon.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from geometry_msgs.msg import PolygonStamped 4 | from geometry_msgs.msg import Point32 5 | import math 6 | import rospy 7 | 8 | topic = "test_polygon" 9 | publisher = rospy.Publisher(topic, PolygonStamped) 10 | 11 | rospy.init_node("send_polygon") 12 | 13 | t = 0 14 | while not rospy.is_shutdown(): 15 | 16 | p = PolygonStamped() 17 | p.header.frame_id = "base_link" 18 | p.header.stamp = rospy.Time.now() 19 | 20 | dr = 0.5 * math.cos(t) 21 | radii = [1 - dr, 1 + dr] 22 | radius_index = 0 23 | num_points = 10 24 | for i in range(0, num_points): 25 | point = Point32() 26 | radius = radii[radius_index] 27 | radius_index = (radius_index + 1) % 2 28 | point.x = radius * math.cos(i * 2 * math.pi / num_points) 29 | point.y = radius * math.sin(i * 2 * math.pi / num_points) 30 | point.z = 0 31 | p.polygon.points.append(point) 32 | 33 | publisher.publish(p) 34 | 35 | t += 0.1 36 | 37 | rospy.sleep(0.03) 38 | -------------------------------------------------------------------------------- /src/test/send_pose.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from geometry_msgs.msg import PoseStamped 4 | import math 5 | import rospy 6 | 7 | topic = "test_pose" 8 | publisher = rospy.Publisher(topic, PoseStamped) 9 | 10 | rospy.init_node("send_pose") 11 | 12 | t = 0 13 | while not rospy.is_shutdown(): 14 | 15 | p = PoseStamped() 16 | p.header.frame_id = "base_link" 17 | p.header.stamp = rospy.Time.now() 18 | 19 | r = 5.0 20 | p.pose.position.x = r * math.cos(t) 21 | p.pose.position.y = r * math.sin(t) 22 | p.pose.position.z = 0 23 | p.pose.orientation.x = 0 24 | p.pose.orientation.y = 0 25 | p.pose.orientation.z = math.sin(0.5 * t) 26 | p.pose.orientation.w = math.cos(0.5 * t) 27 | 28 | publisher.publish(p) 29 | 30 | t += 0.1 31 | 32 | rospy.sleep(0.03) 33 | -------------------------------------------------------------------------------- /src/test/send_range.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from sensor_msgs.msg import Range 4 | import rospy 5 | 6 | topic = "test_range" 7 | publisher = rospy.Publisher(topic, Range) 8 | 9 | rospy.init_node("range_test") 10 | 11 | dist = 3 12 | 13 | while not rospy.is_shutdown(): 14 | 15 | r = Range() 16 | r.header.frame_id = "base_link" 17 | r.header.stamp = rospy.Time.now() 18 | 19 | r.radiation_type = 0 20 | r.field_of_view = 2.0 / dist 21 | r.min_range = 0.4 22 | r.max_range = 10 23 | r.range = dist 24 | 25 | publisher.publish(r) 26 | 27 | rospy.sleep(0.1) 28 | 29 | dist += 0.3 30 | if dist > 10: 31 | dist = 3 32 | -------------------------------------------------------------------------------- /src/test/send_wrench.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | from geometry_msgs.msg import WrenchStamped 4 | import math 5 | import rospy 6 | 7 | topic = "test_wrench" 8 | publisher = rospy.Publisher(topic, WrenchStamped) 9 | 10 | rospy.init_node("send_wrench") 11 | 12 | t = 0 13 | while not rospy.is_shutdown(): 14 | 15 | p = WrenchStamped() 16 | p.header.frame_id = "base_link" 17 | p.header.stamp = rospy.Time.now() 18 | 19 | f = 0.5 * math.sin(t) 20 | p.wrench.force.x = 0 21 | p.wrench.force.y = 0 22 | p.wrench.force.z = f * math.sin(t) 23 | 24 | q = 0.5 + 0.5 * math.sin(t / 3.14) 25 | p.wrench.torque.x = q * math.sin(t) 26 | p.wrench.torque.y = q * math.cos(t) 27 | p.wrench.torque.z = 0 28 | 29 | publisher.publish(p) 30 | 31 | t += 0.1 32 | 33 | rospy.sleep(0.03) 34 | -------------------------------------------------------------------------------- /src/test/stl_loader_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | TEST(STLLoader, load) 7 | { 8 | // Get the path to the directory where the meshes are located. 9 | std::string meshDir = "package://rviz/src/test/meshes/"; 10 | 11 | // Load a valid ascii STL file. 12 | std::string meshFilePath = meshDir + "valid_ascii.stl"; 13 | EXPECT_TRUE(rviz::loadMeshFromResource(meshFilePath).get()); 14 | 15 | // Load an invalid ascii STL file, using "end facet" instead of "endfacet" 16 | meshFilePath = meshDir + "invalid_end_tags.stl"; 17 | EXPECT_FALSE(rviz::loadMeshFromResource(meshFilePath).get()); 18 | 19 | // Load an invalid STL binary file (size < 84 bytes). 20 | meshFilePath = meshDir + "invalid_short.stl"; 21 | EXPECT_FALSE(rviz::loadMeshFromResource(meshFilePath).get()); 22 | 23 | // Load an invalid STL binary file (size does not match the expected size). 24 | meshFilePath = meshDir + "invalid.stl"; 25 | EXPECT_FALSE(rviz::loadMeshFromResource(meshFilePath).get()); 26 | 27 | // Load an invalid STL binary file (size does not match the expected size, 28 | // but does if incorrectly read as an 16-bit uint) 29 | meshFilePath = meshDir + "16bit_vs_32bit_should_fail.stl"; 30 | EXPECT_FALSE(rviz::loadMeshFromResource(meshFilePath).get()); 31 | 32 | // Load a valid STL binary file. 33 | meshFilePath = meshDir + "valid.stl"; 34 | EXPECT_TRUE(rviz::loadMeshFromResource(meshFilePath).get()); 35 | 36 | // Load a "potentially" valid STL binary file with extra data at the end of the file 37 | meshFilePath = meshDir + "invalid_extra.stl"; 38 | EXPECT_FALSE(rviz::loadMeshFromResource(meshFilePath).get()); 39 | } 40 | 41 | int main(int argc, char** argv) 42 | { 43 | testing::InitGoogleTest(&argc, argv); 44 | 45 | // initialize ogre resource system 46 | rviz::RenderSystem::get(); 47 | 48 | return RUN_ALL_TESTS(); 49 | } 50 | -------------------------------------------------------------------------------- /src/test/triangle_list_marker.yaml: -------------------------------------------------------------------------------- 1 | header: 2 | seq: 1 3 | stamp: 4 | secs: 0 5 | nsecs: 0 6 | frame_id: base_link 7 | ns: cube 8 | id: 1 9 | type: 11 10 | action: 0 11 | pose: 12 | position: 13 | x: 0.0 14 | y: 0.0 15 | z: 0.0 16 | orientation: 17 | x: 0.0 18 | y: 0.0 19 | z: 0.0 20 | w: 1.0 21 | scale: 22 | x: 1.0 23 | y: 1.0 24 | z: 1.0 25 | color: 26 | r: .5 27 | g: .5 28 | b: 1 29 | a: 1 30 | lifetime: 31 | secs: 0 32 | nsecs: 0 33 | frame_locked: False 34 | text: "" 35 | points: 36 | - x: 0 37 | y: 0 38 | z: 0 39 | - x: 1 40 | y: 0 41 | z: 0 42 | - x: 1 43 | y: 1 44 | z: 0 45 | - x: 0 46 | y: 0 47 | z: 0 48 | - x: 1 49 | y: 0 50 | z: 0 51 | - x: 1 52 | y: 0 53 | z: 1 54 | - x: 0 55 | y: 0 56 | z: 0 57 | - x: 0 58 | y: 0 59 | z: 0 60 | - x: 0 61 | y: 0 62 | z: 0 63 | mesh_resource: "" 64 | mesh_use_embedded_materials: False 65 | -------------------------------------------------------------------------------- /srv/SendFilePath.srv: -------------------------------------------------------------------------------- 1 | std_msgs/String path # absolute path to file or directory 2 | --- 3 | bool success 4 | --------------------------------------------------------------------------------