{"id":13704357,"url":"https://github.com/PickNikRobotics/rviz_visual_tools","last_synced_at":"2025-05-05T09:33:41.461Z","repository":{"id":22162955,"uuid":"25494512","full_name":"PickNikRobotics/rviz_visual_tools","owner":"PickNikRobotics","description":"C++ API wrapper for displaying shapes and meshes in Rviz","archived":false,"fork":false,"pushed_at":"2025-01-07T17:14:11.000Z","size":3932,"stargazers_count":779,"open_issues_count":38,"forks_count":243,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-01-07T18:26:14.280Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PickNikRobotics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-10-21T00:59:11.000Z","updated_at":"2025-01-07T17:14:16.000Z","dependencies_parsed_at":"2024-01-05T23:57:45.919Z","dependency_job_id":"135368fd-c232-43a0-b48b-0995e36458c1","html_url":"https://github.com/PickNikRobotics/rviz_visual_tools","commit_stats":null,"previous_names":[],"tags_count":37,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PickNikRobotics%2Frviz_visual_tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PickNikRobotics%2Frviz_visual_tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PickNikRobotics%2Frviz_visual_tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PickNikRobotics%2Frviz_visual_tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PickNikRobotics","download_url":"https://codeload.github.com/PickNikRobotics/rviz_visual_tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252471724,"owners_count":21753239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-02T21:01:08.064Z","updated_at":"2025-05-05T09:33:40.494Z","avatar_url":"https://github.com/PickNikRobotics.png","language":"C++","funding_links":[],"categories":["Data Visualization and Mission Control","Interaction"],"sub_categories":["RViz","Data Visualization and Mission Control"],"readme":"# Rviz Visual Tools\n\nC++ API wrapper for displaying shapes and meshes in Rviz via helper functions that publish markers. Useful for displaying and debugging data. For more advanced robot visualization features, see the [moveit_visual_tools](https://github.com/davetcoleman/moveit_visual_tools) which builds on this class.\n\nThis package includes:\n\n - Rviz Panel GUI to step through your code for debugging and testing\n - Rviz-based keyboard control for stepping through application\n - Easy to use helper functions for visualizing in Rviz fast\n - Basic geometric markers for Rviz\n - More complex geometric shapes such as coordinate frames, framed boxes, planes, paths, graphs\n - Ability to quickly choose standard colors and sizes\n - Tools to ensure proper connection to Rviz before publishing visualizations\n - Shortcuts to convert between different types of points and poses - ROS msgs, Eigen, tf, etc\n - Batch publishing capabilities to reduce over throttling ROS messages\n - A tf publishing helper class\n - An interactive marker helper class\n\n\n\u003cimg src=\"https://picknik.ai/assets/images/logo.jpg\" width=\"120\"\u003e\n\nThis open source project was developed at [PickNik Robotics](https://picknik.ai/). Need professional ROS development and consulting? Contact us at projects@picknik.ai for a free consultation.\n\n * [![Build Status](https://travis-ci.org/PickNikRobotics/rviz_visual_tools.svg)](https://travis-ci.org/PickNikRobotics/rviz_visual_tools) Travis CI\n * [![Build Status](http://build.ros.org/buildStatus/icon?job=Kbin_uX64__rviz_visual_tools__ubuntu_xenial_amd64__binary)](http://build.ros.org/view/Kbin_uX64/job/Kbin_uX64__rviz_visual_tools__ubuntu_xenial_amd64__binary/) ROS Kinetic Buildfarm - AMD64 Xenial Debian Build for Ubuntu 16.04\n * [![Build Status](http://build.ros.org/buildStatus/icon?job=Kdev__rviz_visual_tools__ubuntu_xenial_amd64)](http://build.ros.org/view/Kdev/job/Kdev__rviz_visual_tools__ubuntu_xenial_amd64/) ROS Kinetic Buildfarm - AMD64 Xenial Devel Build for Ubuntu 16.04\n * [![Build Status](http://build.ros.org/buildStatus/icon?job=Msrc_uB__rviz_visual_tools__ubuntu_bionic__source)](http://build.ros.org/job/Msrc_uB__rviz_visual_tools__ubuntu_bionic__source/) ROS Melodic Buildfarm - AMD64 Bionic Debian Build for Ubuntu 18.04\n * [![Build Status](http://build.ros.org/buildStatus/icon?job=Mdev__rviz_visual_tools__ubuntu_bionic_amd64)](http://build.ros.org/job/Mdev__rviz_visual_tools__ubuntu_bionic_amd64/) ROS Melodic Buildfarm - AMD64 Bionic Devel Build for Ubuntu 18.04\n\n\n![](resources/screenshot.png)\n\n## Install\n\n### Ubuntu Debian\n\n```\nsudo apt-get install ros-melodic-rviz-visual-tools\n```\n\n### Build from Source\n\nClone this repository into a catkin workspace, then use the rosdep install tool to automatically download its dependencies. Depending on your current version of ROS, use:\n```\nrosdep install --from-paths src --ignore-src --rosdistro melodic\n```\n\n## Quick Start Demo\n\nTo see random shapes generated in Rviz, first launch Rviz:\n\n    roslaunch rviz_visual_tools demo_rviz.launch\n\nThen start demo:\n\n    roslaunch rviz_visual_tools demo.launch\n\n## Code API\n\nSee [the Doxygen documentation](http://docs.ros.org/melodic/api/rviz_visual_tools/html/annotated.html)\n\n## Usage\n\nWe'll assume you will be using these helper functions within a class. Almost all of the functions assume you are publishing transforms in the world frame (whatever you call that e.g. /odom).\n\n### Initialize\n\nAdd to your includes:\n```\n#include \u003crviz_visual_tools/rviz_visual_tools.h\u003e\n```\n\nAdd to your class's member variables:\n```\n// For visualizing things in rviz\nrviz_visual_tools::RvizVisualToolsPtr visual_tools_;\n```\n\nIn your class' constructor add:\n```\nvisual_tools_.reset(new rviz_visual_tools::RvizVisualTools(\"base_frame\",\"/rviz_visual_markers\"));\n```\n\nChange the first parameter to the name of your robot's base frame, and the second parameter to whatever name you'd like to use for the corresponding Rviz marker ROS topic.\n\n### Tools\n\nNow in your code you can easily debug your code using visual markers in Rviz\n\nStart rviz and create a new marker using the 'Add' button at the bottom right. Choose the marker topic to be the same as the topic you specified in the constructor.\n\n### Example Code\n\nIn the following snippet we create a pose at xyz (0.1, 0.1, 0.1) and rotate the pose down 45 degrees along the Y axis. Then we publish the pose as a arrow for visualziation in Rviz. Make sure your Rviz fixed frame is the same as the one chosen in the code.\n\n    // Create pose\n    Eigen::Isometry3d pose;\n    pose = Eigen::AngleAxisd(M_PI/4, Eigen::Vector3d::UnitY()); // rotate along X axis by 45 degrees\n    pose.translation() = Eigen::Vector3d( 0.1, 0.1, 0.1 ); // translate x,y,z\n\n    // Publish arrow vector of pose\n    ROS_INFO_STREAM_NAMED(\"test\",\"Publishing Arrow\");\n    visual_tools_-\u003epublishArrow(pose, rviz_visual_tools::RED, rviz_visual_tools::LARGE);\n\n    // Don't forget to trigger the publisher!\n    visual_tools_-\u003etrigger();\n\nFor more example code see [rviz_visual_tools_demo.cpp](https://github.com/PickNikRobotics/rviz_visual_tools/blob/melodic-devel/src/rviz_visual_tools_demo.cpp)\n\n## Rviz GUI Usage\n\nPublishes on the topic of ``/rviz_visual_tools_gui``\n\nThe buttons in the [Joy](http://docs.ros.org/api/sensor_msgs/html/msg/Joy.html) message correspond to the following:\n\n```\n1 - Next\n2 - Continue\n3 - Break\n4 - Stop\n```\n\nNote: only Next is fully implemented\n\n### Mouse-Based Control\n\n![](resources/dashboard_screenshot.png)\n\nUse the Rviz panel called \"RvizVisualToolsGui\" to step through your program.\n\n### Keyboard-Based Control\n\n![](resources/keytool_screenshot.png)\n\nSwitch to the \"KeyTool\" in the top of the Rviz window and use the following keyboard commands:\n - n: next\n - c or a: continue\n - b: break\n - s: stop\n\n## API\n\n### Basic Publishing Functions\n\nSee ``rviz_visual_tools.h`` for more details and documentation on the following functions:\n\n - publishSphere\n - publishSpheres\n - publishArrow/publishXArrow\n - publishYArrow\n - publishZArrow\n - publishCuboid\n - publishCone\n - publishXYPlane\n - publishXZPlane\n - publishYZPlane\n - publishLine\n - publishPath\n - publishPolygon\n - publishBlock\n - publishWireframeCuboid\n - publishWireframeRectangle\n - publishAxis\n - publishAxisLabeled\n - publishCylinder\n - publishMesh\n - publishText\n - publishTest\n\nAnd more...\n\n### Helper Functions\n\nReset function\n\n - ``deleteAllMarkers()`` - tells Rviz to clear out all current markers from being displayed.\n\nAll markers must be triggered after being published, by calling the ``trigger()`` function. This allows batch publishing to be achieved by only calling after several markers have been created, greatly increasing the speed of your application. You can even explicitly tell ``rviz_visual_tools`` how often to publish via the ``triggerEvery(NUM_MARKERS)`` command:\n\n - trigger()\n - triggerEvery(20)\n\nConversion functions\n\n - convertPose\n - convertPoint32ToPose\n - convertPoseToPoint\n - convertPoint\n - convertPoint32\n - convertFromXYZRPY\n - convertToXYZRPY\n\nConvenience functions\n\n - generateRandomPose\n - generateEmptyPose\n - dRand\n - fRand\n - iRand\n - getCenterPoint\n - getVectorBetweenPoints\n\nFrame locking\n\n![](resources/frame_locking.gif)\n\nThis allows the markers to be automatically updated as the base frame moves without having to republish. You can enable it via ``enableFrameLocking()`` (this is not enabled by default).\n\n### Available Colors\n\nThis package helps you quickly choose colors - feel free to send PRs with more colors as needed\n\n    BLACK,\n    BLUE,\n    BROWN,\n    CYAN,\n    DARK_GREY,\n    GREEN,\n    GREY,\n    LIME_GREEN,\n    MAGENTA,\n    ORANGE,\n    PINK,\n    PURPLE,\n    RED,\n    WHITE,\n    YELLOW,\n    TRANSLUCENT_LIGHT,\n    TRANSLUCENT,\n    TRANSLUCENT_DARK,\n    RAND,\n    CLEAR,\n    DEFAULT // i.e. 'do not change default color'\n\n### Available Marker Sizes\n\n    XXXXSMALL,\n    XXXSMALL,\n    XXSMALL,\n    XSMALL,\n    SMALL,\n    MEDIUM,\n    LARGE,\n    XLARGE,\n    XXLARGE,\n    XXXLARGE,\n    XXXXLARGE,\n\n## Interactive Marker Helper Class\n\nThis class quickly gives you basic 6dof pose interactive marker funcitonality. A demo is available:\n\n    roslaunch rviz_visual_tools demo_rviz.launch\n    rosrun rviz_visual_tools imarker_simple_demo\n\n## TF Visual Tools\n\nThis tool lets you easily debug Eigen transforms in Rviz. Demo use:\n\n    rviz_visual_tools::TFVisualTools tf_visualizer;\n    Eigen::Isometry3d world_to_shelf_transform = Eigen::Isometry3d::Identity(); // or whatever value\n    tf_visualizer.publishTransform(world_to_shelf_transform, \"world\", \"shelf\");\n\n*Note: this is a work in progress*\n\n## Testing and Linting\n\nTo run [roslint](http://wiki.ros.org/roslint), use the following command with [catkin-tools](https://catkin-tools.readthedocs.org/):\n\n    catkin build --no-status --no-deps --this --make-args roslint\n\nTo run [catkin lint](https://pypi.python.org/pypi/catkin_lint), use the following command with [catkin-tools](https://catkin-tools.readthedocs.org/):\n\n    catkin lint -W2\n\nUse the following command with [catkin-tools](https://catkin-tools.readthedocs.org/) to run the small amount of available tests:\n\n    catkin run_tests --no-deps --this -i\n\nRun with clang-tidy:\n\n    run-clang-tidy-4.0.py -clang-tidy-binary=/usr/lib/llvm-4.0/bin/clang-tidy -fix -p=/home/dave/ros/current/ws_moveit/build/rviz_visual_tools .\n\n## Docker Image\n\n[Dockerhub](https://hub.docker.com/r/davetcoleman/rviz_visual_tools/builds/) automatically creates a Docker for this repo. To run with GUI:\n\n    # This is not the safest way however, as you then compromise the access control to X server on your host\n    xhost +local:root # for the lazy and reckless\n    docker run -it --env=\"DISPLAY\" --env=\"QT_X11_NO_MITSHM=1\" --volume=\"/tmp/.X11-unix:/tmp/.X11-unix:rw\" davetcoleman/rviz_visual_tools:melodic\n    export containerId=$(docker ps -l -q)\n    # Close security hole:\n    xhost -local:root\n\n(Optional) To build the docker image locally for this repo, run in base of package:\n\n    docker build -t davetcoleman/rviz_visual_tools:melodic .\n\n## Contribute\n\nPlease send PRs for new helper functions, fixes, etc!\n\nWhen a pull request is opened, a reviewer is randomly assigned from the reviewer list using the [Auto Assign Github Bot](https://probot.github.io/apps/auto-assign/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPickNikRobotics%2Frviz_visual_tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPickNikRobotics%2Frviz_visual_tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPickNikRobotics%2Frviz_visual_tools/lists"}