asked 2019-12-03 08:07:45 -0500

yosra gravatar image

I used for my real robot 4 wheels + ydlidar x4 with raspberry pi 3b , all the control of wheels and decision to move the robot is handled in the stm32 that communicate with the raspberry pi 3B via uart , just the raspberry pi has to sent via uart 4 commands "F" for forward "B" for back "L" for left and "R" for right.To do well the navigation , I succed to build and save a map of the environment using hector slam and then using the laser_scan_matcher to replace the odometry because I don't have the informations of the wheels and the amcl to know the actual positon of the robot don't know how to navigate to B position ??

edit retag flag offensive close merge delete


Look at the ROS navigation stack

stevemacenski gravatar image stevemacenski  ( 2019-12-03 12:05:43 -0500 )edit

@stevemacenski That's not exactly OP's question, it's more like "How to setup the navigation stack given my custom robot". It's following #q338866.

Delb gravatar image Delb  ( 2019-12-04 02:19:13 -0500 )edit

@yosra You need to get odometry informations from your robot (take a look at this tutorial). When you have that you could be able to run move_base but you will still require to either change the way you command the robot or get the result from move_base (either the path calculated or directly the cmd_vel topic) and use your commands accordingly.

Delb gravatar image Delb  ( 2019-12-04 02:22:13 -0500 )edit

The problem that I can't use odometry i used hector slam for building the map not gmapping bcause I don't have information from stm32 of wheel sensors this is whay I tried with laser_scan_matcher package ...Could I then use the move_base package to get cmd _vel and then use my commands accordingly?

yosra gravatar image yosra  ( 2019-12-04 02:51:16 -0500 )edit

Odometry to build a map isn't required but for the navigation stack it is. You have tutorials (like this one) to create the odometry frame and topic. Using the laser_scan_matcher is indeed a good approach to localize the robot.

Delb gravatar image Delb  ( 2019-12-04 03:01:32 -0500 )edit

Thank you for answring but how could i get odmetry information from may robot if I only use a laser sensor yslidar x4 could I replace it with the laser_scan_matcher ?

yosra gravatar image yosra  ( 2019-12-04 03:19:53 -0500 )edit

I've told you : you have to create it, have you looked at the link in my previous comment ? You can take the example and just have to set the variables vx, vy, vth from your commands to fake the odometry. Since you only have forward, backward, left and right you seem to have constant velocities for each commands so that shouldn't be really hard to implement.

Delb gravatar image Delb  ( 2019-12-04 04:21:11 -0500 )edit