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

Bob112358's profile - activity

2019-06-03 05:34:40 -0500 received badge  Famous Question (source)
2019-06-02 02:09:05 -0500 received badge  Enthusiast
2019-05-31 10:40:00 -0500 commented answer robot_localization - using odometry and gps - get weird data

Indeed, it has. I added an example message in EDIT2

2019-05-31 10:39:29 -0500 edited question robot_localization - using odometry and gps - get weird data

robot_localization - using odometry and gps - get weird data Hello there, I'm having trouble with the robot_localizatio

2019-05-31 04:52:34 -0500 received badge  Notable Question (source)
2019-05-31 02:55:44 -0500 commented answer robot_localization - using odometry and gps - get weird data

Thanks for your advice. I changed some values in the covariance matrix, just to see, if it has any influence. As I only

2019-05-31 02:55:06 -0500 edited question robot_localization - using odometry and gps - get weird data

robot_localization - using odometry and gps - get weird data Hello there, I'm having trouble with the robot_localizatio

2019-05-31 02:55:06 -0500 received badge  Editor (source)
2019-05-31 02:54:52 -0500 commented answer robot_localization - using odometry and gps - get weird data

Thanks for your advice. I changed some values in the covariance matrix, just to see, if it has any influence. As I only

2019-05-31 02:54:08 -0500 edited question robot_localization - using odometry and gps - get weird data

robot_localization - using odometry and gps - get weird data Hello there, I'm having trouble with the robot_localizatio

2019-05-31 02:54:06 -0500 commented answer robot_localization - using odometry and gps - get weird data

Thanks for your advice. I changed some values in the covariance matrix, just to see, if it has any influence. As I only

2019-05-30 22:19:31 -0500 received badge  Favorite Question (source)
2019-05-30 06:28:33 -0500 received badge  Popular Question (source)
2019-05-29 08:05:01 -0500 asked a question robot_localization - using odometry and gps - get weird data

robot_localization - using odometry and gps - get weird data Hello there, I'm having trouble with the robot_localizatio

2015-01-12 11:02:37 -0500 asked a question Rviz multiple markers partly not published

Hello there, I have the following problem: I am creating six markers in a .cpp and want to display them all in rviz. One is a mesh_resource (.dae 8MB), three different cylinders, one sphere, one LINE_STRIP.

My problem is, that it is a question of chance, if all of them are displayed or only one or two. That differs from execution to execution. The problem seems to be lying at rviz (or my use of it), because in the Markers:Namespaces in rviz there are sometimes missing some of the markers. It is a coincidence which markers are missing. Another problem is that changes to the position of the markers are sometimes displayed, sometimes they remain at their old position, printing out the changes in the command line shows, that they indeed have changed.

I want to show the relevant pieces of Code:

int main( int argc, char** argv )
{
    ros::init(argc, argv, "youbot");
    ros::NodeHandle n;
    ros::Time begin = ros::Time::now();
    ros::Duration five(5.0);
    ros::Rate r(1);
    ros::Publisher marker_pub = n.advertise<visualization_msgs::Marker>("visualization_marker", 1);
    geometry_msgs::Point points[4];
    points[0].x = 0;
    points[0].y = 2.5;
    points[1].x = 5.0;
    points[1].y = 2.5;
    points[2].x = 5;
    points[2].y = -2.5;
    points[3].x = 0;
    points[3].y = -2.5;

while (ros::ok())
{
    visualization_msgs::Marker youbot1, arena, can, ball, chosen_r, chosen_g;

    set_marker(&youbot1, (char *)"youbot1", 0, visualization_msgs::Marker::MESH_RESOURCE, (char *)"package://mesh_marker/robot.dae", 1, 2, 0, 1, 1, 1, 0, 0, 0, NULL);
    set_marker(&arena, (char *)"arena", 1, visualization_msgs::Marker::LINE_STRIP, NULL, 0, 0, 0, 0.1, 0.1, 0.1, 0.8, 0.47, 0, points);
    set_marker(&can, (char *)"can", 2, visualization_msgs::Marker::CYLINDER, NULL, 3, 2, 0.08, 0.1, 0.1, 0.15, 1, 0, 0, NULL);
    set_marker(&ball, (char *)"ball", 3, visualization_msgs::Marker::SPHERE, NULL, 4, -1.5, 0.04, 0.08, 0.08, 0.08, 1, 0, 0, NULL);
    set_marker(&chosen_r, (char *)"chosen_r", 4, visualization_msgs::Marker::CYLINDER, NULL, 1, 2, 0, 0.8, 0.8, 0.01, 0, 1, 0, NULL);
    set_marker(&chosen_g, (char *)"chosen_g", 5, visualization_msgs::Marker::CYLINDER, NULL, can.pose.position.x, can.pose.position.y, can.pose.position.z, 0.4, 0.4, 0.01, 0, 0, 1, NULL);

    if (ros::Time::now() - five > begin) {
        set_pose(&youbot1, 2, -2, 0);
        set_pose(&chosen_r, 2, -2, 0);
    }
    // Publish the markers

    marker_pub.publish(youbot1);
    marker_pub.publish(arena);
    marker_pub.publish(can);
    marker_pub.publish(ball);
    marker_pub.publish(chosen_r);
    marker_pub.publish(chosen_g);

    r.sleep();
}
}

set_marker(...) is a function that is assigning all the data a marker needs. That is just for better reading.

My question would be: How can I make sure, that all the publishes really take place and are recognized by rviz? Or are there simply too many markers?

I have tried leaving out any of the markers. There is no one, that causes the problem alone, not even the mesh_resource, which was my favourite when thinking about the error. Is there really ... (more)