ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Ochoa92's profile - activity

2020-03-03 11:34:38 -0500 received badge  Famous Question (source)
2019-11-21 06:58:56 -0500 marked best answer ros melodic rviz visualization markers bug

Hello ROS community,

I migrated from ROS kinetic to melodic recently and I found some bugs related to rviz visualization markers. For example, the points scale does not change and it is displayed always with a same color. I never have this kind of problem with kinetic and also with indigo. It is important to refer that I have tried already to reinstall ROS and also I copied the Markers: Points and Lines (C++) tutorial and the problem persist. In addition, this only happens with Points and Sphere Lists, because I tried with Line Strips and Line Lists and worked well.

The used algorithm is presented next:

#include <franka_udrilling/udrilling_state.h>
#include <tf/transform_broadcaster.h>
#include <visualization_msgs/Marker.h>

int main(int argc, char **argv){

    ros::init(argc, argv, "test_node");
    ros::NodeHandle nh;
    franka_udrilling::uDrillingState panda(nh);


    ros::Publisher marker_pub = nh.advertise<visualization_msgs::Marker>("visualization_marker", 10);

    visualization_msgs::Marker points, line_strip;
    points.header.frame_id = line_strip.header.frame_id = "/panda_link0";
    points.header.stamp = line_strip.header.stamp = ros::Time::now();
    points.ns = line_strip.ns = "points_and_lines";
    points.id = 0;
    line_strip.id = 1;
    points.action = line_strip.action = visualization_msgs::Marker::ADD;
    points.type = visualization_msgs::Marker::POINTS;
    line_strip.type = visualization_msgs::Marker::LINE_STRIP;

    points.pose.orientation.w = line_strip.pose.orientation.w = 1.0;

    // POINTS markers use x and y scale for width/height respectively
    points.scale.x = 0.01;
    points.scale.y = 0.01;

    // LINE_STRIP/LINE_LIST markers use only the x component of scale, for the line width
    line_strip.scale.x = 0.01;

    // Set the color -- be sure to set alpha to something non-zero!
    points.color.a = 1.0;
    points.color.r = 1.0f;
    points.color.g = 0.0f;
    points.color.b = 0.0f;

    // Line strip is blue
    line_strip.color.a = 1.0;
    line_strip.color.b = 1.0;

    // ---------------------------------------------------------------------------
    // GET INITIAL POSE
    // ---------------------------------------------------------------------------
    Eigen::Matrix4d O_T_EE;
    Eigen::VectorXd pose(7,1);


    // ---------------------------------------------------------------------------
    // MAIN LOOP
    // ---------------------------------------------------------------------------
    ros::Rate loop_rate(100);
    int count = 0;
    while (ros::ok()){

        O_T_EE = panda.O_T_EE;
        pose = panda.robotPose(O_T_EE);

        geometry_msgs::Point p;
        p.x = pose[0];
        p.y = pose[1];
        p.z = pose[2];

        points.points.push_back(p);
        line_strip.points.push_back(p);

        // if(line_strip.points.size() > 30){
        //   line_strip.points.erase(line_strip.points.begin());
        // }
        //
        // if(points.points.size() > 30){
        //   points.points.erase(points.points.begin());
        // }

        marker_pub.publish(points);
        // marker_pub.publish(line_strip);

        if(sf::Keyboard::isKeyPressed(sf::Keyboard::Space))
        break;

        ros::spinOnce();
        loop_rate.sleep();
        count++;
    }

    return 0;
}

Best Regards, Hélio Ochoa

As you can see in the pictures bellow the line markers works without any problems, but the point markers are completely invisible.

image description(/upfiles/15731284289094426.png)image description

2019-11-21 06:58:56 -0500 received badge  Scholar (source)
2019-11-20 08:49:32 -0500 commented question ros melodic rviz visualization markers bug

I updated my gpu drivers and problem solved. Thank for your help.

2019-11-08 04:48:29 -0500 received badge  Enthusiast
2019-11-07 21:43:37 -0500 received badge  Notable Question (source)
2019-11-07 06:14:46 -0500 commented question ros melodic rviz visualization markers bug

As you can see in the screenshots the points have no color and a very small scale.

2019-11-07 06:12:43 -0500 edited question ros melodic rviz visualization markers bug

ros melodic rviz visualization markers bug Hello ROS community, I migrated from ROS kinetic to melodic recently and I f

2019-11-07 06:12:43 -0500 received badge  Editor (source)
2019-11-07 06:08:25 -0500 edited question ros melodic rviz visualization markers bug

ros melodic rviz visualization markers bug Hello ROS community, I migrated from ROS kinetic to melodic recently and I f

2019-11-07 06:01:16 -0500 received badge  Supporter
2019-11-04 09:17:40 -0500 commented answer ros melodic rviz visualization markers bug

Sorry. Basically I put the following line in my ".bashrc" file and then I restart the terminal: export LC_NUMERIC="en_US

2019-11-04 05:35:04 -0500 commented answer ros melodic rviz visualization markers bug

Thank you for your help. I tried what you suggest, but unfortunately in my case did not work. Do you have any other solu

2019-11-02 09:12:03 -0500 received badge  Popular Question (source)
2019-10-30 11:01:56 -0500 asked a question ros melodic rviz visualization markers bug

ros melodic rviz visualization markers bug Hello ROS community, I migrated from ROS kinetic to melodic recently and I f