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

Have turtlebot run in linear paths, using the navigation stack

asked 2020-05-21 09:54:41 -0500

Fredzibob gravatar image

Hi.

I have a turtlebot3 running in gazebo and rviz, and made a node that feed the navigation stack coordinates. via the following snippet:

  move_base_msgs::MoveBaseGoal goal;

  goal.target_pose.header.frame_id = "map";
  goal.target_pose.header.stamp = ros::Time::now();
  goal.target_pose.pose.position.x = 5;
  goal.target_pose.pose.position.y = 5;
  goal.target_pose.pose.orientation.w = 1.0;
  ac.sendGoal(goal);

The issue is that I want it to only drive in linear paths and dont do obstacle avoidance. Preferably just stop, if it encounters an obstacle.

Are these parameters that I can set?

Im using AMCL for localization, running ubuntu 16.04 and ROS Kinetic.

edit retag flag offensive close merge delete

Comments

I think you'll need to create some custom controller plugins so that it does an exact line following behavior, but also given the lack of obstacle avoidance, you probably don't even want the navigation stack, you want something far simpler, just a line follower. I don't think you have a need for something has heavy as autonomous navigation. There's no "obstacle avoidance off" setting.

stevemacenski gravatar image stevemacenski  ( 2020-05-21 11:09:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-23 08:37:58 -0500

Roberto Z. gravatar image

You can try the Carrot Planner, it will move the robot straight to the goal position and stop it in front of any obstacle.

To test it you just have to add the following code to the launch file where you start move_base:

<param name="base_global_planner" value="carrot_planner/CarrotPlanner" />

This is an exemplary launch file:

<?xml version="1.0"?>
<launch>

  <!-- Start move_base (nav stack) node and load config files -->    
  <node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen">
    <rosparam file="$(find your_pkg)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
    <rosparam file="$(find your_pkg)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
    <rosparam file="$(find your_pkg)/config/local_costmap_params.yaml" command="load" />
    <rosparam file="$(find your_pkg)/config/global_costmap_params.yaml" command="load" />
    <rosparam file="$(find your_pkg)/config/base_local_planner_params.yaml" command="load" />

    <!-- Set the global planner: -->
    <param name="base_global_planner" value="carrot_planner/CarrotPlanner" /> 

  </node>

</launch>
edit flag offensive delete link more

Comments

It worked!!! Carrot_planner is a bit flaky though. A lot of uncontrollably spinning.

Thank you Roberto Z!

Fredzibob gravatar image Fredzibob  ( 2020-05-25 06:02:01 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-21 09:54:41 -0500

Seen: 206 times

Last updated: May 23 '20