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

FOXTER's profile - activity

2019-06-24 12:20:56 -0500 answered a question /map not connecting to tf links for loading multiple robots in rviz

I think it is because amcl is still looking relative to the namespace for the map (because it is using the service "stat

2017-08-15 00:37:53 -0500 received badge  Famous Question (source)
2017-06-12 15:07:13 -0500 received badge  Notable Question (source)
2017-05-18 14:46:09 -0500 received badge  Popular Question (source)
2017-04-05 09:05:21 -0500 commented answer Rostest and move_base actionlib

Yes thank you!. I Tried approach number 2, and basically put the class I attached into a node by it self, and launching it through the rostest launch file, and it works perfectly.

2017-04-05 09:04:28 -0500 received badge  Scholar (source)
2017-04-05 03:57:22 -0500 asked a question Rostest and move_base actionlib

Hi

I have a package which relies on the move_base action server interface. Is it possible to mock the move_base server in rostest/gtest, so i can perform unittests? I have tried creating a simple action server in the test, as

class MoveBaseAction
{
protected:
  ros::NodeHandle nh_;
  typedef actionlib::SimpleActionServer<move_base_msgs::MoveBaseAction> MoveBaseActionServer;
  MoveBaseActionServer * as_; // NodeHandle instance must be created before this line. Otherwise strange error occurs.
  std::string action_name_;
  // create messages that are used to published feedback/result
  move_base_msgs::MoveBaseFeedback feedback_;
  move_base_msgs::MoveBaseResult result_;

public:

  MoveBaseAction(std::string name) :
    action_name_(name)
  {
    ROS_ERROR("Starting server...");
    //as_ = new actionlib::SimpleActionServer<move_base_msgs::MoveBaseAction>(nh_, name, boost::bind(&MoveBaseAction::executeCB, this, _1), false),
    as_ = new MoveBaseActionServer(ros::NodeHandle(), "move_base", boost::bind(&MoveBaseAction::executeCB, this, _1), false);
    as_->registerGoalCallback(boost::bind(&MoveBaseAction::goalCB, this));
    as_->start();
  }

  ~MoveBaseAction(void)
  {
  }
  void goalCB(){

  }

  void executeCB(const move_base_msgs::MoveBaseGoalConstPtr &goal)
  {
    // helper variables
    ros::Rate r(1);
    bool success = true;

    // push_back the seeds for the fibonacci sequence
    move_base_msgs::MoveBaseFeedback feedback_;
    double N = 100;
    double dx = goal->target_pose.pose.position.x/N;
    double dy = goal->target_pose.pose.position.y/N;
    fprintf(stderr,"goal is (%f,%f)", goal->target_pose.pose.position.x,goal->target_pose.pose.position.y);
    // start executing the action
    for(int i = 1; i <= N; i++) {
      // check that preempt has not been requested by the client
      if (as_->isPreemptRequested() || !ros::ok()) {
        printf("%s: Preempted", action_name_.c_str());
        // set the action state to preempted
        as_->setPreempted();
        success = false;
        break;
      }

      feedback_.base_position.pose.position.x = dx*i;
      feedback_.base_position.pose.position.y = dy*i;
      fprintf(stderr,"Progress is (%f,%f)", feedback_.base_position.pose.position.x, feedback_.base_position.pose.position.y);

      // publish the feedback
      as_->publishFeedback(feedback_);
      // this sleep is not necessary, the sequence is computed at 1 Hz for demonstration purposes
      r.sleep();
    }

    if(success) {
      fprintf(stderr,"%s: Succeeded", action_name_.c_str());
      // set the action state to succeeded
      as_->setSucceeded(result_);
    }
  }
};

And then use the class in the test as

typedef actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction> MoveBaseClient;
MoveBaseAction as("move_base");
MoveBaseClient ac_("move_base", true);

//wait for the action server to come up
while(!ac_.waitForServer(ros::Duration(1.0)) && ros::ok()){
  ros::spinOnce();
  ROS_ERROR("Waiting for the move_base action server");
}

But it hangs in the waitForServer loop. I think it have something to do with the fact i am not spinning ros, but i cannot figure out a proper way to do it. I would like to able to test my own class, which works as an action client to move_base. Regards

Christian

2016-12-29 00:24:22 -0500 answered a question no TF between base_link and map in multiple-robots in gazebo

I think it is because you accidentally look for you map in the namespace.
In the launch file for you nodes you should look whether your nodes subscribe to "map" or "/map".
"/map" is the global topic for the map which you want to use as the map_server should not be launched in a namespace.
From the error it seems that the issue is with amcl, so I would probably look in the amcl launch file and change "map" to "/map".
When you only write "map" amcl tries to subscribe to "robot_0/map" topic because of the namespace, but as map_server is global the topic does not exist.

2016-10-20 08:22:28 -0500 received badge  Good Question (source)
2016-09-22 23:14:34 -0500 received badge  Nice Question (source)
2016-09-07 13:37:30 -0500 received badge  Famous Question (source)
2016-08-30 03:29:53 -0500 received badge  Student (source)
2016-08-30 03:17:30 -0500 received badge  Popular Question (source)
2016-08-30 03:17:30 -0500 received badge  Notable Question (source)
2016-08-25 02:26:38 -0500 answered a question Navigation stack should use which node map_server or map_saver

map_saver saves a map generated by gmapping to a file on the computer. You can then use the map_server package for publishing this saved map for localization.

So in short map_saver saves a generated map, and map_server uses the saved map.

2016-08-23 10:50:48 -0500 asked a question Best way to work with Jetson TK1 and ubuntu 16.04 LTS with ROS Kinetic

We have a development setup around Ubuntu 16.04 LTS and ROS Kinetic and if possible we would like to interface it with a Jetson TK1 in a multimachine ROS setup.
Looking around i haven't found any obvious solution, but have considered the following scenarios which might be possible:

  1. Install ubuntu 16.04 armhf and download ROS kinetic as binary.

  2. Install the default Nvidia linux image (ubuntu 14.04 I think) and compile ROS Kinetic from source.

  3. Install the default Nvidia linux image and install ROS Indigo as binary.

Which of these possibilities would be most feasible (if any)?
Or is there another option for setting up the system?

2016-08-22 15:05:08 -0500 answered a question AMCL Global Localization Upside Down

If you are just interested in the localization and it doesn't matter if it is global localization, then you can give it starting pose through the "2D Pose Estimate" button in Rviz. Then it will try to localize with respect to this initial point.

The issue with AMCL is that with the global localization you cannot be sure it converges to the correct localization due to aliasing and the probabilistic nature of the particle filter.

2016-08-19 02:13:34 -0500 answered a question ROS Navigation help

Yes you can do that. I would look into the map_server package: http://wiki.ros.org/map_server which takes a predefined map and enables it for navigation. It also defines how the image format should be. Most of the navigation algorithms (amcl, etc) use a 2D map, so you probably should convert it to 2D.

2016-06-09 06:12:41 -0500 commented answer Global planner path update faster

You can also increase the "obstacle_range" parameter for the costmaps which is the maximum distance where obstacles are added.

2016-06-09 06:11:02 -0500 commented answer Global planner path update faster

If you are using the move_base node, there is the "planner_frequency" parameter which determines the frequency which the global planner runs at. If you increase the value the global plan will update more often.

2016-06-08 05:44:37 -0500 answered a question Minimum allowed number of particles

Try and look up a Particle filter on google, in order to understand the parameters you need some background knowledge of the filter. In short each particle is a simulated potential position of the robot. Each position is then scored with respect to the current laserscan and map.

The minimum number of particles is the minimum number of particles you want in your filter to maintain an accurate belief of the robots position.

2016-06-03 09:40:39 -0500 received badge  Teacher (source)
2016-06-03 06:07:20 -0500 answered a question Use different LaserScan source for obstacle avoidance

Yes. In the costmap configuration you can specify the observation_sources, where you can choose a different topic. Look under the costmap configuration section here: http://wiki.ros.org/navigation/Tutori... .

2016-05-31 06:33:08 -0500 commented question Hesitate! When turtlebot meet the obstacles

It might be that you have set the "observation_persistence" parameter for your observation source to some non-zero value?

2016-05-29 17:29:01 -0500 received badge  Enthusiast
2016-05-24 14:40:46 -0500 commented question AMCL Observation Model

When multiplying the probabilities this might "punish" an otherwise good scoring pose/scan. When adding the probabilities together a single "bad" beam doesn't punish the entire sample.

2016-05-24 14:40:45 -0500 commented question AMCL Observation Model

I am also working on a project where i use AMCL, and am very curious about the changes in the algorithm. My theory is that the algorithm in the book assumes a completely correct and static map, where in the likelihood field, dynamic objects might result in a single beam scoring very low.

2016-05-24 13:28:19 -0500 received badge  Supporter (source)