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

dan's profile - activity

2023-02-13 06:28:55 -0500 received badge  Famous Question (source)
2023-02-13 06:28:55 -0500 received badge  Notable Question (source)
2022-09-07 06:23:46 -0500 marked best answer how to display robot_pose_ekf/odom_combined in rviz

I have robot_pose_ekf running nicely, publishing both the transform odom_combined → base_footprint as well as the topic robot_pose_ekf/odom_combined (geometry_msgs/PoseWithCovarianceStamped)

The transform shows up well in rviz, reflecting robot moves correctly. But I am unable to see robot_pose_ekf/odom_combined. When I enter that topic as an odometry type, of course, I get a mismatch error (expecting nav_msgs/Odometry, received geometry_msgs/PoseWithCovarianceStamped, disconnecting). I also tried entering it as a Pose, but rviz then is looking for geometry_msgs/PoseStamped so the message again gets disconnected.

So how do I get robot_pose_ekf/odom_combined to display in rviz?

2022-09-07 06:23:46 -0500 received badge  Good Answer (source)
2022-09-07 06:23:46 -0500 received badge  Enlightened (source)
2022-03-21 09:04:44 -0500 received badge  Famous Question (source)
2021-09-28 06:41:04 -0500 received badge  Nice Answer (source)
2021-04-26 02:01:01 -0500 received badge  Notable Question (source)
2021-04-25 17:27:54 -0500 commented answer subscribing to /tf returns only a partial list

Thanks, this explanation is very helpful. The overall objective is to find transforms for newly detected objects. The

2021-04-25 01:37:52 -0500 received badge  Popular Question (source)
2021-04-24 19:38:57 -0500 commented question subscribing to /tf returns only a partial list

Some insight-- there are 4 different nodes publishing to tf, so any single tf message will only have the transforms from

2021-04-24 18:12:20 -0500 asked a question subscribing to /tf returns only a partial list

subscribing to /tf returns only a partial list I am trying to get all of the tf frames and am subscribing to /tf I am u

2021-02-07 15:52:37 -0500 answered a question E: unable to locate package ros-melodic-desktop-full

Here is the solution-- change the key

2021-02-07 15:47:39 -0500 commented question E: unable to locate package ros-melodic-desktop-full

Same problem. Did you find a solution?

2021-01-24 13:49:33 -0500 marked best answer where's the carrot in tf tutorial?

I am following the tf tutorial and am a little stuck on the broadcast frame page: tf/tutorials/adding a frame

I am able to get it to run, but only see turtle1 and turtle2, no carrot. This makes sense to me, since I see where turtle2 is spawned (in the listener code) and no place where a carrot is spawned. It wouldn't really matter, except turtle2's behavior looks not correct-- it is not going to a spot 2m in front of turtle1 (where the carrot should be), but is doing something close to that, so I'd like to get the visual indicator for that.

I get that there may not be a drawing of a carrot, so I'm fine with just using a third turtle or some other visual indicator of the target.

I think that somehow I need to spawn the carrot, either in the broadcast frame code or in the listener code. Suggestions?

2020-11-21 14:42:18 -0500 received badge  Nice Question (source)
2020-09-07 11:57:29 -0500 marked best answer how to remove forward bias in move_base

I have a robot that senses and moves in reverse just as well as in forward. However, move_base trajectories are highly biased toward turning the robot around and moving forward. I tried setting prefer_forward_cost_function to 0.0 and also tied turning on and off DWA, but these have no apparent effect.

Is there some way to remove the forward bias in move_base?

Revised:

I tried the excellent suggestion of making min_vel_x negative and initially thought it worked, but in fact, it does not.

The output from move_base still does not generate negative x velocities. When given a goal to the rear, with a blank map, it turns 180 degrees and goes there. If I set max_vel_x = 0.0, then it just turns in place. Here is base_local_planner_params.yaml

Second revise: I swapped from TrajectoryPlanner to DWAPlanner (param file and move_base output shown below) but it does not seem to make any difference.

Third revise: I was entering DWAPlanner parameters, but did not select DWAPlanner as the local planner, so it was defaulting to TrajectoryPlanner. Adding this line to the parameter list fixed that and the bot now goes backwards.

base_local_planner: "DWAPlannerROS"

Many thanks to David Lu for his help with this.

controller_frequency: 4.0
recovery_behavior_enabled: true
clearing_rotation_allowed: false

DWAPlannerROS:
   max_vel_x: 0.3
   min_vel_x: -0.5
   max_rotational_vel: 0.5
   min_vel_theta: -0.5
   min_in_place_vel_theta: 0.2
   escape_vel: -0.1
   acc_lim_x: 2.3
   acc_lim_y: 2.3
   acc_lim_theta: 1.5

   holonomic_robot: false
   yaw_goal_tolerance: 0.1 # about 6 degrees
   xy_goal_tolerance: 0.2  # 20 cm
   latch_xy_goal_tolerance: false
   pdist_scale: 0.8
   gdist_scale: 0.6
   meter_scoring: true
   prefer_forward_cost_function: 0.0

   heading_lookahead: 1.0
   heading_scoring: false
   heading_scoring_timestep: 0.8
   occdist_scale: 0.1
   oscillation_reset_dist: 0.05
   publish_cost_grid_pc: false
   prune_plan: true

   sim_time: 1.5
   sim_granularity: 0.025
   angular_sim_granularity: 0.025
   vx_samples: 8
   vtheta_samples: 20
   dwa: true
   simple_attractor: false

Just in case it is useful, here is the output from move_base startup. Note that it is using rangefinders as sources and I thought maybe the rear sensors were creating an obstacle, but the behavior is unchanged with the hokuyo sensors removed.

SUMMARY
========

PARAMETERS
 * /map_server/frame_id: map
 * /move_base/DWAPlannerROS/acc_lim_theta: 1.5
 * /move_base/DWAPlannerROS/acc_lim_x: 2.3
 * /move_base/DWAPlannerROS/acc_lim_y: 2.3
 * /move_base/DWAPlannerROS/angular_sim_granularity: 0.025
 * /move_base/DWAPlannerROS/dwa: True
 * /move_base/DWAPlannerROS/escape_vel: -0.1
 * /move_base/DWAPlannerROS/gdist_scale: 0.6
 * /move_base/DWAPlannerROS/heading_lookahead: 1.0
 * /move_base/DWAPlannerROS/heading_scoring: False
 * /move_base/DWAPlannerROS/heading_scoring_timestep: 0.8
 * /move_base/DWAPlannerROS/holonomic_robot: False
 * /move_base/DWAPlannerROS/latch_xy_goal_tolerance: False
 * /move_base/DWAPlannerROS/max_rotational_vel: 0.5
 * /move_base/DWAPlannerROS/max_vel_x: 0.3
 * /move_base/DWAPlannerROS/meter_scoring: True
 * /move_base/DWAPlannerROS/min_in_place_vel_theta: 0.2
 * /move_base/DWAPlannerROS/min_vel_theta: -0.5
 * /move_base/DWAPlannerROS/min_vel_x: -0.5
 * /move_base/DWAPlannerROS/occdist_scale: 0.1
 * /move_base/DWAPlannerROS/oscillation_reset_dist: 0.05
 * /move_base/DWAPlannerROS/pdist_scale: 0.8
 * /move_base/DWAPlannerROS/prefer_forward_cost_function: 0.0
 * /move_base/DWAPlannerROS/prune_plan: True
 * /move_base/DWAPlannerROS/publish_cost_grid_pc: False
 * /move_base/DWAPlannerROS/sim_granularity: 0.025
 * /move_base/DWAPlannerROS/sim_time: 1.5
 * /move_base/DWAPlannerROS/simple_attractor: False
 * /move_base/DWAPlannerROS/vtheta_samples: 20
 * /move_base/DWAPlannerROS/vx_samples: 8
 * /move_base/DWAPlannerROS/xy_goal_tolerance: 0.2
 * /move_base/DWAPlannerROS/yaw_goal_tolerance: 0.1
 * /move_base/clearing_rotation_allowed: False
 * /move_base/controller_frequency: 4.0
 * /move_base/global_costmap/footprint: [[0 ...
(more)
2020-08-08 13:52:03 -0500 marked best answer rosserial lost sync with device

I occasionally get a lost sync message with rosserial: "Lost sync with device, restarting..." and am wondering what exactly is being restarted and how best to recover from that in the arduino code.

It seems that the python code is fine with starting while the arduino is running its loop(). So am I correct in interpreting that to mean the python code does not need to be running for the setup() part of the arduino code, the part where the initNode() statement as well as the advertise and subscribe statements occur?

I am driving a roomba with the arduino and it seems I most often get the "lost sync" when the roomba is taking its time getting some task completed. The python code does not recover from that. I tried putting in a statement to check if the connection was up: while (!nh.connected())...... but whenever it disconnected, it would just stay in this loop and never recover.

Suggestions?

2020-06-29 08:24:25 -0500 received badge  Great Question (source)
2020-05-27 06:42:17 -0500 received badge  Famous Question (source)
2020-05-25 12:21:42 -0500 commented answer Unable to locate package ros-noetic-desktop-full

Thank you for this excellent and detailed answer!

2020-05-25 12:21:12 -0500 marked best answer Unable to locate package ros-noetic-desktop-full

Trying to install noetic (with melodic installed) with Ubuntu Bionic, but cannot find the package. I followed the installation instructions. The file /etc/apt/sources.list.d/ros-latest.list contains

deb http://packages.ros.org/ros/ubuntu bionic main

Here is the response to the keys update:

$ sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
Executing: /tmp/apt-key-gpghome.34BODFjpk6/gpg.1.sh --keyserver hkp://keyserver.ubuntu.com:80 --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
gpg: key F42ED6FBAB17C654: "Open Robotics <info@osrfoundation.org>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
2020-05-25 02:31:45 -0500 received badge  Notable Question (source)
2020-05-24 18:05:22 -0500 received badge  Popular Question (source)
2020-05-24 16:42:50 -0500 commented answer Unable to locate package ros-noetic-desktop-full

I saw the REP3 doc but thought it meant that Noetic packages must support Ubuntu Focal, not that Noetic would not run on

2020-05-24 12:10:12 -0500 marked best answer amcl with rotated map

I know this was asked previously, but since there was no answer, I hope it is OK to ask.

I would like to align my map xy axes by specifying an origin in the map's yaml file. However, AMCL does not track location when a yaw is put into the map origin. Is there a way to use AMCL with a rotated map?

2020-05-24 12:06:12 -0500 edited question Unable to locate package ros-noetic-desktop-full

Unable to locate package ros-noetic-desktop-full Trying to install noetic (with melodic installed) with Ubuntu Bionic, b

2020-05-24 12:01:24 -0500 asked a question Unable to locate package ros-noetic-desktop-full

Unable to locate package ros-noetic-desktop-full Trying to install noetic (with melodic installed) with Ubuntu Bionic, b

2020-05-07 08:28:54 -0500 received badge  Nice Question (source)
2020-02-25 02:06:46 -0500 marked best answer amcl estimation quality

I would like to know how much to trust the amcl output pose. One thought is to see how well the laser data correlates with obstacles in the cost map, another is to calculate the variance of the particle locations. Is there some standard way to estimate the quality of the amcl pose?

2019-10-15 02:15:11 -0500 marked best answer rosserial deserialization error

I am trying to publish an odometry message from an arduino using rosserial. I have it publishing a tf message fine. But the odom message first required increasing the buffer_size and now gives this error:

[INFO] [WallTime: 1376950638.665497] ROS Serial Python Node
[INFO] [WallTime: 1376950638.671086] Connecting to /dev/ttyACM0 at 57600 baud
[INFO] [WallTime: 1376950641.232339] Note: publish buffer size is 1024 bytes
[INFO] [WallTime: 1376950641.232938] Setup publisher on tf [tf/tfMessage]
[INFO] [WallTime: 1376950641.242256] Setup publisher on odom [nav_msgs/Odometry]
Traceback (most recent call last):
  File ".../catkin_ws/src/rosserial/rosserial_python/nodes/serial_node.py", line 82, in <module>
    client.run()
  File ".../catkin_ws/install/lib/python2.7/dist-packages/rosserial_python/SerialClient.py", line 425, in run
    self.callbacks[topic_id](msg)
  File ".../catkin_ws/install/lib/python2.7/dist-packages/rosserial_python/SerialClient.py", line 99, in handlePacket
    m.deserialize(data)
  File "/opt/ros/groovy/lib/python2.7/dist-packages/nav_msgs/msg/_Odometry.py", line 220, in deserialize
    raise genpy.DeserializationError(e) #most likely buffer underfill
genpy.message.DeserializationError: unpack requires a string argument of length 288

Sometimes, about one in three, there is also this error right after the INFO messages shown above. I suspect it is just some sort of lost sync, since I just installed the latest version of rosserial on a new build of Groovy.

[ERROR] [WallTime: 1376951210.467803] Mismatched protocol version in packet: lost sync or rosserial_python is from different ros release than the rosserial client
[INFO] [WallTime: 1376951210.468270] Protocol version of client is Rev 0 (rosserial 0.4 and earlier), expected Rev 1 (rosserial 0.5+)

Here is the code:

/* 
 * rosserial Planar Odometry Example
 */

#include <ros.h>
#include <ros/time.h>
#include <tf/tf.h>
#include <tf/transform_broadcaster.h>
#include <nav_msgs/Odometry.h>

ros::NodeHandle  nh;

geometry_msgs::TransformStamped t;
tf::TransformBroadcaster broadcaster;
nav_msgs::Odometry myOdom;
ros::Publisher odom_pub("odom", &myOdom);

double x = 1.0;
double y = 0.0;
double theta = 1.57;

char base_link[] = "/base_link";
char odom[] = "/odom";

void setup()
{
  nh.initNode();
  broadcaster.init(nh);
  nh.advertise(odom_pub);
  myOdom.pose.covariance = {0.001, 0, 0, 0, 0, 0, // covariance on x
                        0, 0.001, 0, 0, 0, 0,  // covariance on y
                        0, 0, 0.001, 0, 0, 0,  // covariance on z
                        0, 0, 0, 99999, 0, 0,  // large covariance on rot x
                        0, 0, 0, 0, 99999, 0,  // large covariance on rot y
                        0, 0, 0, 0, 0, 0.001};  //covariance on rot z

}

void loop()
{  
  // drive in a circle
  double vx = 0.2, vy = 0.2;
  double vtheta = 0.18;
  x += cos(theta)*vx*0.1;
  y += sin(theta)*vy*0.1;
  theta += vtheta*0.1;
  if(theta > 3.14)
    theta=-3.14;

  /* 
  Serial.print("x , y, theta = ");
  Serial.print(x);
  Serial.print(", ");
  Serial.print(y);
  Serial.print(", ");
  Serial.println(theta);
  */

  // tf odom->base_link
  t.header.frame_id = odom;
  t.child_frame_id = base_link;

  t.transform.translation.x = x;
  t.transform.translation.y = y;

  t.transform.rotation = tf::createQuaternionFromYaw(theta);
  t.header.stamp = nh.now();

  broadcaster.sendTransform(t);
  nh.spinOnce();

  myOdom.header.stamp = nh.now();
  myOdom.header.frame_id ...
(more)
2019-10-04 10:03:37 -0500 received badge  Famous Question (source)