Hi
I implemented a new global planner. It works perfectly as a C++ program.
I am using Ubuntu 18.04 and ROS melodic installed in a partition of macBookPro
Now, I want to integrate the planner in ROS Navigation Stack and use pre-build maps. I want to use simulated ROSbot2 from Husarion. I followed and tried to integrate the following tutorials:
and
http://wiki.ros.org/navigation/Tutorials/RobotSetup
and
My workspace is: ~/ros_workspace
It contains the following packages:
1- myNewGlobalPlanner
2- rosbot_description
3- rosbot_ekf
4- rplidar_ros
My map and the yaml file are stored in:
ros_workspace/src/rosbot_description/src/rosbot_navigation/maps/gridMap8by8.yaml
ros_workspace/src/rosbot_description/src/rosbot_navigation/maps/gridMap8by8.pgm
The content of yaml file:
image: gridMap8by8.pgm
resolution: 0.1
origin: [0.0, 0.0, 0.0]
occupied_thresh: 0.65
free_thresh: 0.196
negate: 0
This is my .pgm map
http://www.mediafire.com/file/slfs90pewymxxbl/gridMap8by8.pgm/file
The launch file for the Navigation Stack is stored in:
ros_workspace/src/rosbot_description/src/rosbot_navigation/move_rosbot_newPlannerAlgorithm.launch
<launch>
<arg name="use_rosbot" default="true"/>
<arg name="use_gazebo" default="false"/>
<include if="$(arg use_gazebo)" file="$(find rosbot_gazebo)/launch/maze_world.launch"/>
<include if="$(arg use_gazebo)" file="$(find rosbot_gazebo)/launch/rosbot.launch"/>
<param if="$(arg use_gazebo)" name="use_sim_time" value="true"/>
<!-- <node if="$(arg use_rosbot)" pkg="rplidar_ros" type="rplidarNode" name="rplidar"> -->
<!-- <param name="angle_compensate" type="bool" value="true"/> -->
<!-- <param name="serial_baudrate" type="int" value="115200"/> --> <!-- model A2 (ROSbot 2.0) -->
<!-- <param name="serial_baudrate" type="int" value="256000"/> --> <!-- model A3 (ROSbot 2.0 PRO) -->
<!-- </node> -->
<!--- rviz -->
<node pkg="rviz" type="rviz" name="rviz"/>
<!-- Bring the ROSbot model to rviz -->
<include file="$(find rosbot_description)/launch/rosbot.launch"/>
<!-- ROSbot 2.0 ekf -->
<include if="$(arg use_rosbot)" file="$(find rosbot_ekf)/launch/all.launch"/>
<!--- tf -->
<node if="$(arg use_rosbot)" pkg="tf" type="static_transform_publisher" name="laser_broadcaster" args="0 0 0 3.14 0 0 base_link laser 100" />
<!--- Run AMCL -->
<include file="$(find amcl)/examples/amcl_diff.launch" />
<!-- Map server -->
<arg name="map_file" default="$(find rosbot_navigation)/maps/gridMap8by8.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<!-- Move base -->
<node pkg="move_base" type="move_base" name="move_base" output="screen">
<param name="controller_frequency" value="10.0"/>
<param name="base_global_planner" value="my_new_global_planner/MyNewGlobalPlannerROS"/>
</node>
The commands:
$ catkin_make
$ source devel/setup.bash
are ok and do not give errors
However,
$ roslaunch rosbot_navigation move_rosbot_newPlannerAlgorithm.launch
At start, it works normally http://www.mediafire.com/view/p8nzxz7uwk24sly/output1.png/file
But then, it gives errors http://www.mediafire.com/view/riv6n1sd8cxb22u/output1Continued.png/file
My Questions are:
*Why this error " Error opening serial: Could not configure port: (5, ‘Input/output error’) " occurs?
*Can I display or bring ROSbot model to rviz?
*Why Gazebo started while it is set false in the launch file?
*Are the launch file correct? Do I missed packages?
Regarding the map, could you please check it? My maps is built from a 88 2d array of 0s (free) and 100s(obstacle). I converted it using matlab to .pgm image, but it is very small. Is it ok to use it as a map, the maximum dimension that I want to handle is 256*256.
*Do I need rplidar package? I will not build a map at all. Or it is necessary for the local planner?
Using this package caused error “cannot bind to the specified serial port ttyUSB0” which is not found under /dev directory, and I spend days trying to solve this issue with no hope.
Finally, sorry for this long post. After finishing this, I am thinking about writing a tutorial for writing planner using ROSbot.
Appreciate your help.