Giter Site home page Giter Site logo

interactive_markers's People

Contributors

aballier avatar ahcorde avatar dgossow avatar filipjares avatar fmessmer avatar g-gemignani avatar g-kurz avatar hersh avatar hershwg avatar jacobperron avatar matthijsburgh avatar mikeferguson avatar moooeeeep avatar ommmid avatar quarkytale avatar rhaschke avatar robertblakeanderson avatar seanyen avatar shelaf avatar simonschmeisser avatar sloretz avatar tfoote avatar vrabaud avatar wjwwood avatar xqms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

interactive_markers's Issues

Rviz segfaults when using IMs

We've found that when the always_visible() flag is set on markers, and you have attached a mesh to the marker, that Ubuntu nvidia drivers will end up crashing rviz when you are using the controller to change the pose of the marker.. Backtrace of gdb probiced below. This happens on 304--367 Nvidia drivers in Kinetic, but if nouveau is used we don't see it.

Thread 1 "rviz" received signal SIGSEGV, Segmentation fault.
0x00000000400a1c6e in ?? ()
(gdb) bt
#0  0x00000000400a1c6e in ?? ()
#1  0x00007fffab46d079 in ?? () from /usr/lib/nvidia-367/libnvidia-glcore.so.367.57
#2  0x00007fffab473b44 in ?? () from /usr/lib/nvidia-367/libnvidia-glcore.so.367.57
#3  0x00007fffab05a5a9 in ?? () from /usr/lib/nvidia-367/libnvidia-glcore.so.367.57
#4  0x00007fffb81a89c5 in Ogre::GLRenderSystem::_render(Ogre::RenderOperation const&) ()
   from /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/RenderSystem_GL.so.1.9.0
#5  0x00007ffff3b937f7 in Ogre::SceneManager::renderSingleObject(Ogre::Renderable*, Ogre::Pass const*, bool, bool, Ogre::HashedVector<Ogre::Light*> const*) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#6  0x00007ffff3bbdfb9 in Ogre::QueuedRenderableCollection::acceptVisitorGrouped(Ogre::QueuedRenderableVisitor*) const () from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#7  0x00007ffff3bbe095 in Ogre::QueuedRenderableCollection::acceptVisitor(Ogre::QueuedRenderableVisitor*, Ogre::QueuedRenderableCollection::OrganisationMode) const ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#8  0x00007ffff3b7c8df in Ogre::SceneManager::renderBasicQueueGroupObjects(Ogre::RenderQueueGroup*, Ogre::QueuedRenderableCollection::OrganisationMode) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#9  0x00007ffff3b7c757 in Ogre::SceneManager::renderVisibleObjectsDefaultSequence() ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#10 0x00007ffff3b92474 in Ogre::SceneManager::_renderScene(Ogre::Camera*, Ogre::Viewport*, bool) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#11 0x00007ffff3bcef51 in Ogre::Camera::_renderScene(Ogre::Viewport*, bool) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#12 0x00007ffff3b7377a in Ogre::RenderTarget::_updateViewport(Ogre::Viewport*, bool) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#13 0x00007ffff3b735cb in Ogre::RenderTarget::_updateAutoUpdatedViewports(bool) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#14 0x00007ffff3b7311e in Ogre::RenderTarget::updateImpl() ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#15 0x00007ffff3b73ac4 in Ogre::RenderTarget::update(bool) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#16 0x00007ffff3c23e5f in Ogre::RenderSystem::_updateAllRenderTargets(bool) ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#17 0x00007ffff3d3a4ba in Ogre::Root::_updateAllRenderTargets() ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#18 0x00007ffff3d3a5a0 in Ogre::Root::renderOneFrame() ()
   from /usr/lib/x86_64-linux-gnu/libOgreMain.so.1.9.0
#19 0x00007ffff7b4d3ce in rviz::VisualizationManager::onUpdate() ()
   from /opt/ros/kinetic/lib/librviz.so
#20 0x00007ffff2193d2a in QMetaObject::activate(QObject*, int, int, void**) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff21a05c8 in QTimer::timerEvent(QTimerEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff2194bb3 in QObject::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff746a05c in QApplicationPrivate::notify_helper(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff746f516 in QApplication::notify(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#25 0x00007ffff216538b in QCoreApplication::notifyInternal(QObject*, QEvent*) ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ffff21ba5ed in QTimerInfoList::activateTimers() ()
   from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff21baaf1 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff16bc197 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007ffff16bc3f0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007ffff16bc49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007ffff21bb7cf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>)
---Type <return> to continue, or q <return> to quit---q
 (Quit
(gdb) q

Release interactive_markers to Noetic?

Would you mind releasing interactive_markers to ROS Noetic? It looks like all of its dependencies have been released, and recursively 103 repos need it.

I'm not sure how much work it will need. At a minimum it needs #64.

@wjwwood ping :)

Jade Release

Just a friendly ping for a potential jade release to help some blocking packages for the upcoming beta.

Generalized twist_marker_server node

There are a large number of twist-based robots out there which could benefit from a general marker server with basic forward/back/side-to-side/rotate controls.

At Clearpath, we have Husky, Kingfisher, and Grizzly, but there is also Turtlebot, and many others which have either no markers support, or a bespoke one that is essentially a ripoff of turtlebot_interactive_markers. My suggestion is for a twist_marker_server node to live in the interactive_markers package, providing baseline functionality to basic differential drive and holonomic drive bases.

Suggested parameters for such a common node would be:

  • link_name (default: /base_link)
  • linear_scale (default: 1.0)
  • angular_scale (default: 1.0)
  • holonomic (default: False)

Holonomic set to true would enable a linear_y controller, for drive bases with that capability.

If you'd be interested to merge this and release to Hydro, I can provide a pull request in fairly short order. (The alternative is creating new kingfisher_interactive_markers and grizzly_interactive_markers packages, so I'm motivated!)

Modify IM server from a different node

Let's say you launch a standard interactive marker server in one node, and you'd like to be able to edit it (add / remove markers and menu entries) from a second node. Is this currently possible? I'm pretty sure the answer is no.

Here's my motivation- I'm writing a node that interfaces with a haptic device, the Phantom Omni (just imagine a 3D mouse), and uses it to control interactive markers: https://github.com/danepowell/omni_im

In the existing omni_im demo, I launch the IM server and Omni callback from within the same node. In the real world, however, I'll be integrating with an existing interactive marker setup, such as the PR2 Interactive Manipulation demo.

Thus, I'd like to be able to run my omni_im node and have it 'latch into' an existing interactive marker server, and insert a menu entry on each marker to allow the user to select it for Omni control.

Do you have any suggestions on how to solve this problem?

Release into Melodic

It looks like all of the dependencies of this are available in Melodic, so it would be great to get this released. Thanks in advance!

[ROS 2] Flaky tests in Eloquent

There are a couple of flaky tests that seem to occur only in Eloquent:

  • TestInteractiveMarkerClient

    /tmp/ws/src/ros-visualization/interactive_markers/test/interactive_markers/test_interactive_marker_client.cpp:376
    Expected equality of these values:
      mock_server->feedback_received_
        Which is: 0
      1u
        Which is: 1
    
    /tmp/ws/src/ros-visualization/interactive_markers/test/interactive_markers/test_interactive_marker_client.cpp:380
    Expected equality of these values:
      mock_server->feedback_received_
        Which is: 1
      2u
        Which is: 2
    
  • TestInteractiveMarkerServerWithMarkers

    /tmp/ws/src/ros-visualization/interactive_markers/test/interactive_markers/test_interactive_marker_server.cpp:339
    Expected equality of these values:
      mock_client_->updates_received
        Which is: 0
      1u
        Which is: 1
    
    /tmp/ws/src/ros-visualization/interactive_markers/test/interactive_markers/test_interactive_marker_server.cpp:340
    Expected: (mock_client_->last_update_message) != (nullptr), actual: 16-byte object <00-00 00-00 00-00 00-00 00-00 00-00 00-00 00-00> vs (nullptr)
    

Markers are not re-displayed in rviz when using multiple server names in the same node

When using multiple servers which have different names within the same node, disabling and re-enabling the visualisation of the markers in rviz does not work correctly.

The cause of this is likely the update_full topic being used to know when there are markers available. Because this is a latched topic generated by the server, it only retains the last published message on the topic. Each server with a different server_id publishes to the same topic, which means that it's only possible for the process function to get the init message for a single one of the servers.

void SingleClient::process(const visualization_msgs::InteractiveMarkerInit::ConstPtr& msg, bool enable_autocomplete_transparency)

void InteractiveMarkerClient::subscribeInit()
{
if ( state_ != INIT && !topic_ns_.empty() )
{
try
{
init_sub_ = nh_.subscribe( topic_ns_+"/update_full", 100, &InteractiveMarkerClient::processInit, this );
DBG_MSG( "Subscribed to init topic: %s", (topic_ns_+"/update_full").c_str() );
state_ = INIT;
}
catch( ros::Exception& e )
{
callbacks_.statusCb( ERROR, "General", "Error subscribing: " + std::string(e.what()) );
}
}
}

Use the code below to reproduce.

First, start rviz and add an interactive marker visualiser on the topic /test/interactive. Then, run this node. You will see a couple of markers appear, like this:

Screenshot from 2022-07-20 12-07-32

The messages are as expected:

Screenshot from 2022-07-20 12-15-14

Then, uncheck the box to display the markers, and re-check it. You will now only be able to see the arrow marker, since that is the last one which was published on update_full. The status indicates that the circle client is still waiting for an initialisation message.

Screenshot from 2022-07-20 12-16-44

#!/usr/bin/env python
import rospy

from interactive_markers.interactive_marker_server import InteractiveMarkerServer
from visualization_msgs.msg import InteractiveMarker, InteractiveMarkerControl, Marker
from geometry_msgs.msg import Point, Vector3
from std_msgs.msg import ColorRGBA, Header


def generate_circle():
    int_marker = InteractiveMarker()
    int_marker.header.frame_id = "map"
    int_marker.scale = 1
    int_marker.name = "circle"
    int_marker.description = "Move and rotate circle"

    int_marker.pose.position = Point(x=1)

    plane_plus_rot = InteractiveMarkerControl()
    plane_plus_rot.name = "planar_plus_rotation"
    plane_plus_rot.orientation.w = 1
    plane_plus_rot.orientation.x = 0
    plane_plus_rot.orientation.y = 1
    plane_plus_rot.orientation.z = 0
    plane_plus_rot.interaction_mode = InteractiveMarkerControl.MOVE_ROTATE
    int_marker.controls.append(plane_plus_rot)

    z_adjustment = InteractiveMarkerControl()
    z_adjustment.name = "z_adjustment"
    z_adjustment.orientation.w = 1
    z_adjustment.orientation.x = 0
    z_adjustment.orientation.y = 1
    z_adjustment.orientation.z = 0
    z_adjustment.interaction_mode = InteractiveMarkerControl.MOVE_AXIS
    int_marker.controls.append(z_adjustment)

    return int_marker


def generate_arrow():
    int_marker = InteractiveMarker()
    int_marker.header.frame_id = "map"
    int_marker.scale = 1
    int_marker.name = "arrow"
    int_marker.description = "Arrow control"

    int_marker.pose.position.x = 0.5
    int_marker.pose.orientation.w = 1

    arrow_control = InteractiveMarkerControl()
    direction_marker = Marker(
        pose=int_marker.pose,
        id=-1,
        type=Marker.ARROW,
        scale=Vector3(0.2, 0.1, 0.1),
        color=ColorRGBA(r=1, b=1, a=1),
        header=Header(frame_id="map"),
        ns="edges/temp",
        action=Marker.ADD,
    )
    arrow_control.markers.append(direction_marker)
    arrow_control.always_visible = True
    arrow_control.interaction_mode = InteractiveMarkerControl.MENU
    arrow_control.name = "arrow_menu_control"
    int_marker.controls.append(arrow_control)

    return int_marker


if __name__ == "__main__":
    rospy.init_node("multiple_server_test")
    circle_marker_server = InteractiveMarkerServer(
        "/test/interactive", server_id="circle"
    )
    arrow_marker_server = InteractiveMarkerServer(
        "/test/interactive", server_id="arrow"
    )
    # Allow servers to initialise
    rospy.sleep(1)

    circle_marker_server.insert(generate_circle())
    circle_marker_server.applyChanges()

    arrow_marker_server.insert(generate_arrow())
    arrow_marker_server.applyChanges()

    rospy.spin()

Marker contains invalid quaternions (length not equal to 1)!

ROS Kinetic | Ubuntu 16.04
I have some problem with markers visualization. When I used indigo everything was fine. But after migration to kinetic, every marker which uses TF return "Marker contains invalid quaternions (length not equal to 1)!" in corresponding r-viz field.
Can I get some help with it?

Thanks for your time.

screenshot from 2018-01-04 20-31-08

setPose SEGFAULTs if called before applyChanges

Calling setPose() on an interactive marker causes a SEGFAULT if applyChanges() was not called on the server at least once since the marker was created. I traced the actual SEGFAULT to the doSetPose function. The value of header passed from setPose() is invalid because, in this case, marker_context_it = marker_contexts_.end().

I'm not exactly sure what's going on here, so I wasn't able to come up with a fix that worked. I tried passing the new header to doSetPose if marker_contexts_ does not contain name, but this caused nothing to render in RViz.

This is a serious problem for certain use cases of the interactive marker API. I have a lot of superfluous bookkeeping in my code just to work around this issue.

white color rviz

When i run the rviz and view the markers being published it's color is not changeing from white to any other colour. Here is the screenshot i took: https://answers.ros.org/question/353188/white-color-rviz/?comment=353270#post-id-353270

#include <ros/ros.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>

// PCL specific includes
#include <sensor_msgs/PointCloud2.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/sample_consensus/model_types.h>
#include <pcl/sample_consensus/method_types.h>
#include <pcl/segmentation/sac_segmentation.h>
#include "pcl_ros/point_cloud.h"
#include <visualization_msgs/Marker.h>
#include <ros/ros.h>
#include <sensor_msgs/PointCloud2.h>
#include <pcl_conversions/pcl_conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>
#include <iostream>
#include <math.h>
#include <visualization_msgs/Marker.h>
#include "std_msgs/Float32.h"
#include "rosbag/bag.h"
#include <rosbag/view.h>
#include <vector>
#include <utility>
#include <fstream>
#include <utility>
#include <fstream>
#include <iterator>
#include <string>
#include <boost/interprocess/file_mapping.hpp>
#include <boost/interprocess/mapped_region.hpp>
static const std::string OPENCV_WINDOW = "Image window";
using namespace std;
class ImageConverter
{
  ros::NodeHandle nh_;
  image_transport::ImageTransport it_;
  image_transport::Subscriber image_sub_;
  image_transport::Publisher image_pub_;
  ros::Publisher marker_pub = nh_.advertise<visualization_msgs::Marker> ("visualization_marker",1);

public:
  ImageConverter()
    : it_(nh_)
  {
    // Subscrive to input video feed and publish output video feed
    image_sub_ = it_.subscribe("/cv_camera/image_raw", 1,
      &ImageConverter::imageCb, this);
    image_pub_ = it_.advertise("/image_converter/output_video", 1);

    cv::namedWindow(OPENCV_WINDOW);
  }

  ~ImageConverter()
  {
    cv::destroyWindow(OPENCV_WINDOW);
  }

  void imageCb(const sensor_msgs::ImageConstPtr& msg)
  {
    cv_bridge::CvImagePtr cv_ptr;
    try
    {
      cv_ptr = cv_bridge::toCvCopy(msg, sensor_msgs::image_encodings::BGR8);
    }
    catch (cv_bridge::Exception& e)
    {
      ROS_ERROR("cv_bridge exception: %s", e.what());
      return;
    }

    visualization_msgs::Marker marker;
    marker.header.frame_id = "/camera_link";
    marker.header.stamp = ros::Time();
    marker.ns = "lines";
    marker.action = visualization_msgs::Marker::ADD;
    marker.pose.orientation.w = 1;
    marker.id = 0;
    marker.type = visualization_msgs::Marker::POINTS;
    marker.scale.x = 0.1;
    marker.scale.y = 0.1;
    marker.scale.z = 0.1;
    geometry_msgs::Point P; std_msgs::ColorRGBA pc, parent;

    // Draw an example circle on the video stream
    if (cv_ptr->image.rows > 60 && cv_ptr->image.cols > 60)
      cv::circle(cv_ptr->image, cv::Point(50, 50), 10, CV_RGB(255,0,0));

    cv::Mat Lab;
    cv::cvtColor(cv_ptr->image,Lab,cv::COLOR_BGR2Lab); 
    for(int x=0;x<cv_ptr->image.cols;x++) {
    for(int y=0;y<cv_ptr->image.rows;y++) {
        P.x = (float)Lab.at<cv::Vec3b>(y,x)[0]/100.0;
            P.y = (float)Lab.at<cv::Vec3b>(y,x)[1]/128.0;
        P.z = (float)Lab.at<cv::Vec3b>(y,x)[2]/128.0;
            pc.r = (float)cv_ptr->image.at<cv::Vec3b>(y,x)[0]/255.0;
            pc.g = (float)cv_ptr->image.at<cv::Vec3b>(y,x)[1]/255.0;
            pc.b = (float)cv_ptr->image.at<cv::Vec3b>(y,x)[2]/255.0;
            pc.a = 1;
            marker.points.push_back(P);
            marker.colors.push_back(pc);
        }
    }

    marker_pub.publish(marker);            
    // Output modified video stream
    image_pub_.publish(cv_ptr->toImageMsg());
  }
};

int main(int argc, char** argv)
{
  ros::init(argc, argv, "image_converter");
  ImageConverter ic;
  ros::spin();
  return 0;
}

Get all markers from server

Currently there is no public function member to get all markers from the server. However, one alternative way is to subscribe to /<node_name>/update_full topic to get a list of markers name and then do a server->get(name) to have access to them which seem to be redundant. A function that can return all the markers would be easier and more useful.

TestInteractiveMarkerServerWithMarkers tests are failing

From the nightly build farm, armhf and x86_64 builds are failing.

Multiple tests fail with a similar stack trace:


Stacktrace

unknown file
C++ exception with description "failed to initialize wait set: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /home/jenkins-agent/workspace/nightly_linux-armhf_debug/ws/src/ros2/rcl/rcl/src/rcl/wait.c:130" thrown in SetUp().

Standard Output

unknown file
C++ exception with description "failed to initialize wait set: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /home/jenkins-agent/workspace/nightly_linux-armhf_debug/ws/src/ros2/rcl/rcl/src/rcl/wait.c:130" thrown in SetUp().


Reproduced it locally.

@wjwwood @dgossow any chance you guys know why that is? I wasn't able to find where this issue could be coming from?

`InteractiveMarkerServer` raises on shutdown

Current behavior

Attempting to Ctrl+C a Python executable running an InteractiveMarkerServer invariably results in:

  File "repro.py", line 48, in <module>
    main()
  File "repro.py", line 43, in main
    server.shutdown()
  File ".../install/interactive_markers/lib/python3.8/site-packages/interactive_markers/interactive_marker_server.py", line 141, in shutdown
    self.applyChanges()
  File ".../install/interactive_markers/lib/python3.8/site-packages/interactive_markers/interactive_marker_server.py", line 319, in applyChanges
    self.publish(update_msg)
  File ".../install/interactive_markers/lib/python3.8/site-packages/interactive_markers/interactive_marker_server.py", line 400, in publish
    self.update_pub.publish(update)
  File ".../install/rclpy/lib/python3.8/site-packages/rclpy/publisher.py", line 70, in publish
    self.__publisher.publish(msg)
rclpy._rclpy_pybind11.RCLError: Failed to publish: publisher's context is invalid, at .../src/ros2/rcl/rcl/src/rcl/publisher.c:389

Expected behavior

No exceptions on Ctrl+C.

How to reproduce

  1. Run the following Python script against latest ROS 2 Rolling:

    repro.py
    import rclpy
    from rclpy.executors import ExternalShutdownException
    
    from interactive_markers import InteractiveMarkerServer
    from visualization_msgs.msg import InteractiveMarker
    from visualization_msgs.msg import InteractiveMarkerControl
    from visualization_msgs.msg import Marker
    
    def main():
        rclpy.init()
        node = rclpy.create_node('repro')
        server = InteractiveMarkerServer(node, 'server')
    
        box_marker = Marker()
        box_marker.type = Marker.CUBE
        box_marker.scale.x = 1.
        box_marker.scale.y = 1.
        box_marker.scale.z = 1.
        box_marker.color.a = 1.
    
        box_control = InteractiveMarkerControl()
        box_control.always_visible = True
        box_control.markers.append(box_marker)
    
        int_marker = InteractiveMarker()
        int_marker.scale = 1.
        int_marker.name = 'test_marker'
        int_marker.header.frame_id = 'world'
        int_marker.controls.append(box_control)
    
        def noop(*args):
            pass
        server.insert(
            int_marker,
           feedback_callback=noop)
        server.applyChanges()
    
        try:
            rclpy.spin(node)
        except KeyboardInterrupt:
            pass
        finally:
            server.shutdown()
            node.destroy_node()
            rclpy.try_shutdown()
    
    if __name__ == '__main__':
         main()
  2. Attempt to Ctrl+C

Additional considerations

This behavior is new. I presume something changed over at https://github.com/ros2/rclpy. Whether we can cope with that here or not, I can't tell just yet.

Python Examples/Tests

Hi,

This repository does not have any python tests or examples. Is there any guide which can help me with this ?

TIA,
Harshal

Can't select "arrow" with Qt 5.12 & Ogre 1.10.12

Hi, I am wondering if I am doing something stupidly wrong. I have a conda build of RViz that works quite nicely. The only remaining problem seems to be that I can't select / drag interactive markers. They do render correctly though.
It seems like the mouse interaction with the marker just doesn't work. Does someone know where to look in order to fix / debug this?

Screenshot from 2020-07-21 20-51-59

Screenshot from 2020-07-21 20-52-14

Impossible to see the "1 second has passed. Re-initializing." error

I've been trying to debug why my InteractiveMarkers are not rendering in RViz and noticed the topic is briefly flashing red, then turning back to black. The message says "1 second has passed. Re-initializing.", but it is impossible to read because it is almost instantaneously replaced with "Initialization: Waiting for first update/keep-alive message." As far as I can tell, this error isn't logged elsewhere.

I was only able to read the message by recording RViz in gtk-recordmydesktop and stepping through the video frame-by-frame. I suggest either: (1) removing the message if it is redundant, (2) changing the logic so it is not instantly overwritten, and/or (3) logging it using ROS_ERROR.

Allow first feedback sooner than 1 second / allow feedback for markers created during paused sim_time

Hello!

I would like to be able to apply feedback to a marker sooner than 1 second after it has been created. This is currently blocked by

# if two callers try to modify the same marker, reject (timeout= 1 sec)
if marker_context.last_client_id != feedback.client_id \
    and (rospy.Time.now() - marker_context.last_feedback).to_sec() < 1.0:
        rospy.logdebug("Rejecting feedback for ...

because of how marker_context.last_feedback and marker_context.last_client_id are initialized.

This also means that any markers created while sim_time is paused will never get feedback until sim_time is unpaused. My use case here is pausing a bag file and using interactive markers to annotate some data.

If I understand correctly, this could be fixed by initializing market_context.last_feedback to zero, or explicitly checking for last_client_id = ""

Happy to create a PR if you're supportive of this change!

Best,

  • Erik

Port to ROS 2

I've started a port to ROS 2.

Following a brief discussion in #41, I'll outline my plans here. Besides the obvious changes to switch to rclcpp, I plan to make the following changes:

  • Style refactor + enable common ament linter tests (cpplint, uncrustify, flake8, etc ...)
  • Use C++11/14 features where appropriate (e.g smart pointers).
  • Switch from tf to tf2
  • Add the interactive marker feedback publisher to InteractiveMarkerClient.
    • Previously handled by RViz.
  • Replace the "init" topic with a ROS service.
    • It seems more intuitive for clients to request the full state on demand rather than listening to a latched topic (which may have redundant messages queued).
    • We can avoid the logic for clients unsubscribing to the topic after receiving the state.
    • I will prototype a ROS 1 bridge shim to handle the new API.
  • Replace the use of the KEEP_ALIVE timer with the Liveliness QoS setting.
    • Seems like a natural use of Liveliness and should remove the existing timer-related logic.

I've completed a subset of the points above and will open PRs soon for visibility/review.

Unless there are objections, I will target my PR to a new ros2 branch of this repository.

Interactive marker doesn't appear if timestamp is set if rviz fixed frame is on different frame

If an interactive marker stamp is set then the marker doesn't appear, unless rviz fixed frame is on the same frame (moving_frame in the example below).

def makeMovingMarker(position):
    int_marker = InteractiveMarker()
    int_marker.header.frame_id = "moving_frame"
    int_marker.header.stamp = rospy.Time.now()
...

https://github.com/ros-visualization/visualization_tutorials/blob/kinetic-devel/interactive_marker_tutorials/scripts/basic_controls.py#L394

http://answers.ros.org/question/262866/interactive-marker-attached-to-a-moving-frame/

Python Interactive Marker Server does not clear markers

The clear() function in interactive_marker_server.py in class InteractiveMarkerServer does not actually clear the markers from Rviz as the comparable C++ API does. The clear() function should add the following lines to clear the server:

for marker_name in self.marker_contexts.keys():
    self.erase(marker_name)
self.applyChanges()

Python API MenuHandler insert function

Hello,

There seems to be a change in the MenuHandler insert function:
Before (line 64):
if parent != None:

Now (line 65):
if parent is None:

I believe that the older version is correct, but can you please verify, and if so, update the repository?

Thank you,
Noel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.