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

Limit the range scan on the TurtleBot3

asked 2019-04-03 12:08:05 -0500

dranaju gravatar image

Hello, I am a beginner in ROS and I am doing a project with the Burger version of Turtlebot3. Turtlebot3’s LDS default is set to 360 but I want to modify to 24. I know how to make this in the gazebo simulation. You can modify sample of LDS at: turtlebot3/turtlebot3_description/urdf/turtlebot3_burger.gazebo.xacro.

<scan>   
    <horizontal>
      <samples>360</samples>            # The number of sample. Modify it to 24
      <resolution>1</resolution>
      <min_angle>0.0</min_angle>
      <max_angle>6.28319</max_angle>
    </horizontal>
</scan>

The doubt is that I don't know how do to the same in the real version.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2023-04-26 22:41:38 -0500

hunterlineage1 gravatar image

To modify the range scan of the TurtleBot3 in the real version, you need to modify the parameters of the LIDAR sensor. Specifically, you need to change the number of samples and the range of the scan.

To do this, you can use the dynamic reconfigure package in ROS. This package allows you to change the parameters of a node at runtime using a GUI or command-line tool.

First, you need to install the dynamic reconfigure package by running the following command:

sudo apt-get install ros-kinetic-dynamic-reconfigure

Next, launch the TurtleBot3 with the LIDAR sensor: roslaunch turtlebot3_bringup turtlebot3_robot.launch

Then, run the dynamic reconfigure GUI:

rosrun rqt_reconfigure rqt_reconfigure

In the GUI, select the /scan topic and then the LaserScan module. You should see several parameters, including angle_min, angle_max, angle_increment, time_increment, scan_time, and range_min and range_max.

Change the angle_min and angle_max parameters to the desired range of the scan. For example, if you want a 24-sample scan with a range of 30 degrees, set angle_min to -15 and angle_max to 15.

Finally, click the Apply button to apply the changes.

Alternatively, you can use the dynamic_reconfigure command-line tool to set the parameters. For example, to set the angle_min parameter to -15, you can run:

rosrun dynamic_reconfigure dynparam set /scan angle_min -15.0

Note that these changes will not persist after you shutdown the node. If you want to make the changes permanent, you can modify the launch file for the TurtleBot3 or write a ROS parameter file.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-04-03 12:08:05 -0500

Seen: 664 times

Last updated: Apr 26 '23