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

aarontan's profile - activity

2021-02-24 23:09:59 -0500 received badge  Stellar Question (source)
2021-01-18 09:56:00 -0500 received badge  Nice Question (source)
2021-01-18 09:50:21 -0500 received badge  Favorite Question (source)
2020-06-05 04:01:05 -0500 received badge  Favorite Question (source)
2020-04-14 03:43:33 -0500 marked best answer How to follow a nav_msgs/path ?

Hello,

I am using this package to publish an astroid path.

I would like my robot to be able to follow this published path, I was wondering if anyone have a clue about how to approach this problem?

If I would like to redefine the path to something similar to a sine wave, how would I go about that?

Thank you, Aaron

2019-10-13 01:56:54 -0500 received badge  Famous Question (source)
2019-08-26 15:56:31 -0500 received badge  Famous Question (source)
2019-08-18 08:27:26 -0500 received badge  Famous Question (source)
2019-08-09 03:15:08 -0500 received badge  Notable Question (source)
2019-07-23 19:11:03 -0500 received badge  Notable Question (source)
2019-07-23 19:11:02 -0500 received badge  Popular Question (source)
2019-06-25 01:56:15 -0500 received badge  Popular Question (source)
2019-06-24 15:52:21 -0500 commented question Docker with X11 output

@jarvisschultz @gvdhoorn I asked a question here regarding how to use the docker gui tutorials, do you mind giving me so

2019-06-24 15:52:11 -0500 commented question Docker with X11 output

@jarvisschultz I asked a question here regarding how to use the docker gui tutorials, do you mind giving me some insight

2019-06-24 15:51:54 -0500 commented question Docker with X11 output

@jarvisschultz I asked a question hereregarding how to use the docker gui tutorials, do you mind giving me some insight

2019-06-24 15:48:32 -0500 edited question Docker: gazebo: cannot connect to X server

Docker: gazeb: cannot connect to X server Hello, I am running a dockerfile which I pulled from this link. Inside this

2019-06-24 14:14:29 -0500 commented question Docker: gazebo: cannot connect to X server

Thank you for your suggestion. I have opened up a new question regarding my attempt in this direction.

2019-06-24 14:13:15 -0500 asked a question Accessing gzserver on docker from gzclient on host machine

Accessing gzserver on docker from gzclient on host machine Hello, Inspired by @ChuiV 's suggestion from this question

2019-06-24 11:02:39 -0500 commented question Docker: gazebo: cannot connect to X server

@ChuiV thanks for your suggestion, could you please provide some more insight in implementing this alternative solution?

2019-06-24 10:50:55 -0500 commented answer docker: how to use RViz and Gazebo from a container?

Hi Marc, I asked a question here I have tried your solution but it did not work. I am not sure if I am doing it correc

2019-06-24 10:44:55 -0500 asked a question Docker: gazebo: cannot connect to X server

Docker: gazeb: cannot connect to X server Hello, I am running a dockerfile which I pulled from this link. Inside this

2019-06-20 09:08:25 -0500 received badge  Notable Question (source)
2019-06-20 09:08:25 -0500 received badge  Famous Question (source)
2019-06-18 12:10:52 -0500 received badge  Popular Question (source)
2019-06-12 14:09:25 -0500 asked a question Openai_ros openai_examples_projects q-learning example issue

Openai_ros openai_examples_projects q-learning example issue Hello, On a fresh install, I followed this question and pe

2019-06-11 16:41:53 -0500 commented question openai_ros example in local computer does not work.

hello @danny p , I did all the installation you mentioned in your question. However I am receiving the error message bel

2019-05-23 12:50:31 -0500 commented answer PID controller /pid_enable topic for multiple controllers

hello, could you please elaborate how to use this?

2019-05-14 09:35:56 -0500 commented question what is the best way to connect ackermann steering with rviz?

I tried a few methods, the only way that worked for me was to include an IMU to determine yaw for localization. Feeding

2019-03-12 04:41:22 -0500 received badge  Famous Question (source)
2019-03-09 04:53:59 -0500 received badge  Famous Question (source)
2019-03-09 04:53:59 -0500 received badge  Notable Question (source)
2019-01-25 14:46:47 -0500 commented answer UR5 visual servoing

Hello @PeteBlackerThe3rd do you know how to use moveit to calculate the jacobian matrix to convert from ee velocity to j

2019-01-22 09:28:16 -0500 answered a question Using CH Robotics IMU UM7 with ROS

i solved this problem by swapping rx and tx pin

2019-01-22 09:27:28 -0500 answered a question UM7 - Unable to set CREG_COM_SETTINGS

i solved this problem by swapping the tx and rx pin

2019-01-11 12:48:08 -0500 marked best answer Where are the source codes stored?

Hello all,

I am a new ros user trying to get familiar with the environment. I am working with the husky mobile robot package and I am wondering, when I launch the gmapping_demo.launch file in husky_navigation, I know it launches gmapping.launch subsequently.

In the gmapping.launch file, it starts a node with the gmapping package.....my question is, where is the source code for gmapping actually stored in my computer?

I know that there is a gmapping package like this available on github; however, I never installed this so how does my system know how to run gmapping with just installing the husky package? For example, in this package, there is a slam_gmapping/gmapping/src folder that contains the slam_gmapping.cpp file which I believe is the code that makes gmapping work. I am essentially trying to find the slam_gmapping.cpp from the slam_gmapping package in my computer.

I must be missing something ...

2019-01-11 12:42:16 -0500 marked best answer Global Path Planner Plugin with Oscillating Husky and Flickering Path Issue

Hello,

I am trying to make a predefined path for my robot to follow.

From my question here, I was adviced to create a custom global planner plugin to define the path and allow the local planner to follow it. I have gone through the famous global planner plugin tutorial, and I am currently trying to implement the code that is posted as an answer to this question by @tianb03.

I am using the husky navigation package. When I give a final orientation in rviz, the path generated by me is visible but the husky seems to be stuck at its initial position. Once I give the husky a little push, it begins to follow the path towards the goal; however, this path quickly disappear and appear repeatedly, causing the husky to run around in circles...

Here is a link to a video illustrating my problem: https://www.youtube.com/watch?v=VvE5r...

I am wondering, why is this happening? How can I make the husky follow my predefined global path as close as possible before coming to a stop at the destination? (Do I always have to define the orientation? Can it just stop in its tracks as it nears the goal pose without correcting its orientation to a user defined input?)

Below is my implementation of the global planner plugin as suggested by @tianb03 (Based on the carrot planner cpp):

#include <carrot_planner/carrot_planner.h>
#include <pluginlib/class_list_macros.h>

//register this planner as a BaseGlobalPlanner plugin
PLUGINLIB_EXPORT_CLASS(carrot_planner::CarrotPlanner, nav_core::BaseGlobalPlanner)

namespace carrot_planner {

  CarrotPlanner::CarrotPlanner()
  : costmap_ros_(NULL), initialized_(false){}

  CarrotPlanner::CarrotPlanner(std::string name, costmap_2d::Costmap2DROS* costmap_ros)
  : costmap_ros_(NULL), initialized_(false){
    initialize(name, costmap_ros);
  }

  void CarrotPlanner::initialize(std::string name, costmap_2d::Costmap2DROS* costmap_ros){
    if(!initialized_){
      costmap_ros_ = costmap_ros;
      costmap_ = costmap_ros_->getCostmap();

      ros::NodeHandle private_nh("~/" + name);
      private_nh.param("step_size", step_size_, costmap_->getResolution());
      private_nh.param("min_dist_from_robot", min_dist_from_robot_, 0.10);
      world_model_ = new base_local_planner::CostmapModel(*costmap_); 

      initialized_ = true;
    }
    else
      ROS_WARN("This planner has already been initialized... doing nothing");
  }

  //we need to take the footprint of the robot into account when we calculate cost to obstacles
  double CarrotPlanner::footprintCost(double x_i, double y_i, double theta_i){
    if(!initialized_){
      ROS_ERROR("The planner has not been initialized, please call initialize() to use the planner");
      return -1.0;
    }

    std::vector<geometry_msgs::Point> footprint = costmap_ros_->getRobotFootprint();
    //if we have no footprint... do nothing
    if(footprint.size() < 3)
      return -1.0;

    //check if the footprint is legal
    double footprint_cost = world_model_->footprintCost(x_i, y_i, theta_i, footprint);
    return footprint_cost;
  }


  bool CarrotPlanner::makePlan(const geometry_msgs::PoseStamped& start, 
      const geometry_msgs::PoseStamped& goal, std::vector<geometry_msgs::PoseStamped>& plan){

    if(!initialized_){
      ROS_ERROR("The planner has not been initialized, please call initialize() to use the planner");
      return false;
    }

    ROS_DEBUG("Got a start: %.2f, %.2f, and a goal: %.2f, %.2f", start.pose.position.x, start.pose.position.y, goal.pose.position.x, goal.pose.position.y);

    plan.clear();
    costmap_ = costmap_ros_->getCostmap();

    if(goal.header.frame_id != costmap_ros_->getGlobalFrameID()){
      ROS_ERROR("This planner as configured will only accept goals in the %s frame, but a goal was sent in the %s frame ...
(more)
2019-01-11 12:41:31 -0500 marked best answer Custom Global Planner Plugin with Obstacle Avoidance Problems

Hello,

UPDATE: July 5th

I have simplified the predefined path to just a straight line instead of a circle as seen in my original question (see below). I have placed an obstacle in front of the husky to further investigate this obstacle avoidance issue. I have found that when the obstacle is placed within the local costmap, the lcoal planner will attempt to avoid the obstacle; however, never successfully. If there is an obstacle that is originally outside of the local costmap, as the robot moves closer to it (as the obstacle comes into the local costmap), the DWA planner will fail to produce a path...

Here is a video describing this: https://www.youtube.com/watch?v=Wx0SQ...

I am wondering, why is this?

From the video, you will also see that, once i remove the second obstacle, the husky will start behaving weirdly, I am also not sure why this happens. The global path also starts flickering.

ORIGINAL: July 4th

I have created my own custom global planner plugin as described by this tutorial. Instead of what's described in the tutorial, I wrote something to enable my mobile robot to follow a predefined path, in this case a circle. This code will first drive the robot from its original position to a point on the circle with a predefined radius and then circle around this circular path. As it stands now, there are no obstacle avoidance.

My question is, how do I implement obstacle avoidance to this plugin? If an obstacle were to appear on this predefined path, I'd like my robot to maneuver around the obstacle and continue on the same circular path.

Here is a video link showing my situation: https://www.youtube.com/watch?v=QmdPG...

The following is my global planner plugin:

#include <pluginlib/class_list_macros.h>
#include "global_planner.h"


 //register this planner as a BaseGlobalPlanner plugin
 PLUGINLIB_EXPORT_CLASS(global_planner::GlobalPlanner, nav_core::BaseGlobalPlanner)

 using namespace std;

 //Default Constructor
 namespace global_planner {

 GlobalPlanner::GlobalPlanner (){

 }

 GlobalPlanner::GlobalPlanner(std::string name, costmap_2d::Costmap2DROS* costmap_ros){
   initialize(name, costmap_ros);
 }


 void GlobalPlanner::initialize(std::string name, costmap_2d::Costmap2DROS* costmap_ros){

 }

 bool GlobalPlanner::makePlan(const geometry_msgs::PoseStamped& start, const geometry_msgs::PoseStamped& goal,  std::vector<geometry_msgs::PoseStamped>& plan ){


    double radius = 7; //radius of circle
    double resolution = 0.25; //resolution of circle in radians
    double index = resolution; //how much to increment at each point on the circle
    int full_circle = 6/resolution; //how many increments to finish the circle eg. 6 radians is a full circle


    int step = 5; //resolution of the straight part from center to point on circle
    int for_loop=0; //array location counter
    double increment = radius/step; 
    int size = step + full_circle;      


    double x_[size]={0};
    double y_[size]={0};
    double angle;

   //coordinates from center to a point on the circle
   for( int w = 0; w < step; w++){ 

    x_[w]=increment;
    y_[w]=0;
    increment = increment + radius/step;
    for_loop++;

   }

   //coordinates from the point on the circle to the full circle
   for( int s = for_loop; s < size + 1; s++){

    angle = angle + index;
    x_[s] = radius ...
(more)
2019-01-11 12:39:10 -0500 received badge  Famous Question (source)
2018-12-04 01:47:34 -0500 received badge  Famous Question (source)
2018-12-04 01:47:34 -0500 received badge  Notable Question (source)
2018-11-27 08:36:52 -0500 received badge  Notable Question (source)
2018-11-03 10:36:58 -0500 received badge  Famous Question (source)
2018-10-25 08:17:38 -0500 received badge  Famous Question (source)