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

hermanoid's profile - activity

2023-03-16 21:49:32 -0500 received badge  Famous Question (source)
2023-03-16 14:09:34 -0500 received badge  Famous Question (source)
2022-10-18 21:32:41 -0500 received badge  Notable Question (source)
2022-09-09 11:10:28 -0500 received badge  Notable Question (source)
2022-08-23 12:51:17 -0500 received badge  Popular Question (source)
2022-08-20 14:42:13 -0500 commented answer SmacPlannerHybrid cannot find path in tight environment

I no longer have access to the robots, anymore (just went off to college), but one of my old colleagues should be able t

2022-08-19 21:34:01 -0500 marked best answer DWB Controller struggles with navigation in tight scenarios

Hello again, some of you may remember me from my planner troubles. I'm running ROS2 Galactic on Ubuntu 20.04, attempting to use the SmacPlannerHybrid planner and DWB Controller to navigate some unusual constraints, such as our tight (barn) environment and elongated differential robot.

In the other question, I talk about situations where the planner has trouble making paths through certain places. When the planner does produce a valid path, the DWB controller acts very strangely when executing it. Here's an example.

The controller has the robot drive at full speed until it approaches the tight spot, at which point it dramatically slows down except for occasional hard jerks forward,. RVIZ shows these jerks as sudden increases and decreases in the length of the local plan line (in the center of our coffin-shaped robot footprint). These seem to have to do with the arrival of updated plans from the planner. After getting right up to the tight spot, the controller stops entirely until the progress checker aborts navigation.

The strange behavior seems to have to do with the inscribed inflation layer. Here's another example that really highlights that. The article on costmap_2d states that the radius of the inscribed inflation layer is calculated from the footprint we give it. It's the radius of the largest circle that could fit within our footprint. However, it indicates that the controller should only use this region as a place that the center of the robot should never intersect. Instead, this region seems to be getting treated as something the entire perimeter of the robot should never intersect. Of course, the robot will never fit down this narrow lane if that's the case.

In our testing, the robot will happily drive out of the inscribed region, but never in. Furthermore, we can physically move the robot into the inflation layer while navigation is stuck, and as soon as the edge of the robot crosses into the inflation layer, the robot will suddenly pick up to full speed and continue.

Let me know if this tickles any ideas in your minds! I'm willing to bet there's a flaw in my conceptual understandings here. Also, if nothing is obviously wrong - does anyone know how to turn the inscribed region off completely without disabling the inflation layer?

Our controller config:

controller_server:
  ros__parameters:
    use_sim_time: False
    controller_frequency: 20.0
    min_x_velocity_threshold: 0.001
    min_y_velocity_threshold: 0.5
    min_theta_velocity_threshold: 0.001
    failure_tolerance: 5.0 # NOTE: This might be too high and may cause synchronization issues
    odom_topic: "odometry/local"
    progress_checker_plugin: "progress_checker"
    goal_checker_plugins: ["general_goal_checker"] # "precise_goal_checker"
    current_goal_checker: ["general_goal_checker"] # "precise_goal_checker"
    controller_plugins: ["FollowPath"]
    # Progress checker parameters
    progress_checker:
      plugin: "nav2_controller::SimpleProgressChecker"
      required_movement_radius: 0.5
      movement_time_allowance: 30.0
    # Goal checker parameters
    general_goal_checker:
      stateful: True
      plugin: "nav2_controller::SimpleGoalChecker"
      xy_goal_tolerance: 0.35
      yaw_goal_tolerance: 0.25
    FollowPath:
      plugin: "dwb_core::DWBLocalPlanner"
      debug_trajectory_details: True
      min_vel_x: 0.0
      min_vel_y: 0.0
      max_vel_x: 0.15
      max_vel_y: 0.0
      max_vel_theta: 0.6
      min_speed_xy: 0.0
      max_speed_xy: 0.15
      min_speed_theta: 0.0
      # Add high threshold velocity for turtlebot 3 issue.
      # https ...
(more)
2022-08-18 07:27:33 -0500 received badge  Popular Question (source)
2022-08-18 06:06:38 -0500 commented answer SmacPlannerHybrid cannot find path in tight environment

The footprints are the same, they're actually both visualized in the picture and are just overlapping. I apologize, I do

2022-08-18 06:02:41 -0500 commented answer DWB Controller struggles with navigation in tight scenarios

That does add up with what we've been seeing. We'll give tuning it a shot.

2022-08-16 17:32:46 -0500 received badge  Nice Answer (source)
2022-08-16 17:30:10 -0500 received badge  Nice Question (source)
2022-08-16 17:10:04 -0500 marked best answer How to tell if odom localization is "good enough" for the nav2 controller

We're using the Nav2 stack for ROS 2 Galactic, and we've been having some serious problems with navigation. We're using VSLAM for our global positioning and wheel encoders for local positioning, and we're seeing very glitchy behavior from the controller (lots of jerking around, and it has a hard time deciding that its pointing in the right direction). Furthermore, we have troubles where the robot dramatically deviates from the path our SMAC planner finds around corners by up to 12 inches, often causing the robot to collide with obstacles. We are not using the robot_localization package because we are not sure if it is necessary.

Using RVIZ, we can tell that the position the global planner is getting seems quite good, but we don't know how to verify if the odometry position we're feeding into the controller is "good enough" for it to follow the path smoothly and accurately. Setting the static frame in RVIZ to "odom" doesn't really give enough information - visually, the position looks fine enough, but we can't see how the controller is reacting to that position.

RVIZ allows us to "see" what the global planner is seeing to help diagnose issues with it. Is there a setting within RVIZ or even a dedicated tool we can use to "see" what the controller is seeing? Or does the situation I described scream out some obvious problem with our configuration?

2022-08-16 17:10:04 -0500 received badge  Scholar (source)
2022-08-16 17:09:01 -0500 asked a question DWB Controller struggles with navigation in tight scenarios

DWB Controller struggles with navigation in tight scenarios Hello again, some of you may remember me from my planner tro

2022-08-16 17:02:13 -0500 received badge  Self-Learner (source)
2022-08-16 16:36:44 -0500 edited question SmacPlannerHybrid cannot find path in tight environment

SmacPlannerHybrid cannot find path in tight environment We're using ROS 2 Galactic with the SmacPlannerHybrid planner, D

2022-08-16 16:28:54 -0500 edited answer How to tell if odom localization is "good enough" for the nav2 controller

For anyone looking here for a really nice way to debug the controller... Sorry, I've got nothing for you. Here's what I

2022-08-16 16:28:54 -0500 received badge  Editor (source)
2022-08-16 16:27:13 -0500 edited answer How to tell if odom localization is "good enough" for the nav2 controller

For anyone looking here for a really nice way to debug the controller... Sorry, I've got nothing for you. Here's what I

2022-08-16 16:26:25 -0500 answered a question How to tell if odom localization is "good enough" for the nav2 controller

For anyone looking here for a really nice way to debug the controller... Sorry, I've got nothing for you. Here's what I

2022-08-16 16:18:43 -0500 asked a question SmacPlannerHybrid cannot find path in tight environment

SmacPlannerHybrid cannot find path in tight environment We're using ROS 2 Galactic with the SmacPlannerHybrid planner, D

2022-08-16 13:30:07 -0500 received badge  Famous Question (source)
2022-08-04 09:40:40 -0500 commented question How to tell if odom localization is "good enough" for the nav2 controller

If anyone does have a tip for viewing/debugging the controller, I'm still interested in finding ways to debug it. The co

2022-08-04 09:39:33 -0500 commented question How to tell if odom localization is "good enough" for the nav2 controller

Thanks for the tip, Steve! Getting our robot to navigate in a stable fashion has been an ongoing struggle, unfortunatel

2022-07-28 11:56:35 -0500 received badge  Famous Question (source)
2022-07-24 15:15:03 -0500 received badge  Notable Question (source)
2022-07-22 15:43:17 -0500 received badge  Popular Question (source)
2022-07-22 08:51:36 -0500 asked a question How to tell if odom localization is "good enough" for the nav2 controller

How to tell if odom localization is "good enough" for the nav2 controller We're using the Nav2 stack for ROS 2 Galactic,

2022-06-03 13:59:44 -0500 received badge  Notable Question (source)
2022-06-03 11:36:18 -0500 received badge  Self-Learner (source)
2022-06-03 11:30:35 -0500 answered a question Nav2 planner_server's compute_path_to_pose hangs indefinitely

We did end up solving this problem, but not in a way that allows me to point to what the solution was. After fighting th

2022-06-03 11:11:41 -0500 commented answer Nav2 planner_server's compute_path_to_pose hangs indefinitely

Basically, no! I'll submit an answer to this question with what I do know.

2022-06-03 11:06:42 -0500 received badge  Nice Question (source)
2022-06-03 08:24:56 -0500 received badge  Popular Question (source)
2022-05-24 15:39:10 -0500 asked a question Nav2 planner_server compute_path_to_pose hangs indefinitely

Nav2 planner_server compute_path_to_pose hangs indefinitely We're using ROS Galactic and Nav2, trying to get our robot t

2022-05-24 15:22:30 -0500 asked a question Nav2 planner_server's compute_path_to_pose hangs indefinitely

Nav2 planner_server's compute_path_to_pose hangs indefinitely We're attempting to implement a basic nav2 stack on our ro

2021-10-28 09:18:24 -0500 commented answer "cv_bridge" throws boost import error in Python 3 and ROS Melodic

I havent used PyTorch, but in my experience with Tensorflow, convincing the framework to use old python just isn't going

2021-07-31 15:45:01 -0500 received badge  Guru (source)
2021-07-31 15:45:01 -0500 received badge  Great Answer (source)
2021-07-28 02:55:58 -0500 received badge  Student (source)
2021-07-28 02:52:23 -0500 marked best answer "cv_bridge" throws boost import error in Python 3 and ROS Melodic

I'm running a script that uses cv_bridge with OpenCV 4, on Python 3, on ROS Melodic, on Raspbian, on a Raspberry Pi 4, and I'm running into errors trying to dynamically import cv_bridge.boost and failing.

I built ROS from source following these instructions, and installed opencv with sudo pip3 install opencv-contrib-python==4.1.0.25. I've had to do a bit of a hack to get it to import properly (I run sys.path.append('/usr/lib/python2.7/dist-packages') before I import cv2) but beyond these hacks, OpenCV 4 seems to be playing nice with Python 3, and Python 3 seems to be playing nice with ROS.

I from cv_bridge import CvBridge, CvBridgeError without issue, then run:

self.bridge = CvBridge()
image_opencv = self.bridge.imgmsg_to_cv2(data, desired_encoding="passthrough")

on a helper class, where data (as the function suggests) is a standard ROS Image message. (In my case, I'm getting these messages from the cv_camera topic /cv_camera/image_raw)

when I try to run that, I get this error:

[ERROR] [1588106367.612936]: bad callback: <bound method tpu_detector.callback of <__main__.tpu_detector object at 0xa7061df0>>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/pi/catkin_ws/src/edge_tpu/scripts/detect_ros.py", line 91, in callback
    data, desired_encoding="passthrough")
  File "/home/pi/catkin_build_ws/install/lib/python2.7/dist-packages/cv_bridge/core.py", line 163, in imgmsg_to_cv2
    dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding)
  File "/home/pi/catkin_build_ws/install/lib/python2.7/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels
    return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding))
  File "/home/pi/catkin_build_ws/install/lib/python2.7/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2
    from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)

every time an image message arrives. Which, to put it lightly, really sucks. I've googled the snot out of it, and come up with a few pages, all of which tell me to build cv_bridge for Python 3 - but I already have. Multiple times. Following the instructions in this Medium post line by line, the error persists. The error traceback above prooves that this custom-built package is being imported like it's supposed to.

It's worth noting that I had to use catkin_make to build cv_bridge properly; catkin build cv_bridge(with all the extra flags of https://stackoverflow.com/questions/4..., plus an extra -DPYTHON3=1 I added to placate NumPy) fails for no apparent reason (I've pasted the output into this gist if anyone believes it to be related to the issue)

I have been stuck on this issue for a multitude of hours and have gotten no closer to a solution - any help will be much appreciated!

2021-07-28 02:52:23 -0500 received badge  Enlightened (source)