-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sonar sensor ? #1
Comments
Hi @Arvrairobo Sorry for the trouble. Here are the answers to your questions.
Regards |
Thank you very much for quick answer The sonar sensor is not using at this moment, but you can subscribe to that topic and you can use it for a range sensor layer [http://wiki.ros.org/range_sensor_layer]. This is an optional feature, that's why I didn't mention it. |
Hello, still waiting for the answer |
Hi @Arvrairobo It will work with Kinect. Currently, the depth to the laser scanner package will convert the point cloud from Kinect to laser scan messages. If we want more accuracy, we can add a sonar sensor in the robot which will improve the accuracy of the map building. The following link may help to add the sonar topic to the navigation stack https://medium.com/teamarimac/range-sensor-layer-abdb18a0ff2e |
ok so that means sonar sensor is used only for accurate map building or it has actual use on detecting obstacles too while robot is moving? if it has any use in detecting obstacles while moving then what changes i need to do in move base or in the code? |
i am about to buy ros robotics projects book of yours :) thank you very much for all those knowledge sharing |
@Arvrairobo The building of the map is done by finding obstacles by the laser scanner. The laser scanner is the main sensor for map building, if you add sonar, the thing is, it can also short-range obstacles while moving and it can update the map according to that. The laser scanner is fine enough for mapping and dynamic obstacle detection, but there is a provision in navigation stack to add a sonar sensor to add an extra layer of obstacle detection. I have mentioned a link in the above command. You can follow that to add sonar sensors. |
Thanks :) |
ok cool got it, so that means all i need to do is add that thing in the costmap, local map and other configuration and read the sonar sensor values and publish it using /range_data topic, correct? final question for today, so if i dont use kinect sensor and just use range of sonar sensors and use that range_sonar_layer plugin those to create a map and then obstacle avoidance only with sonar sensors, is it possible? |
also for better robot navigation and obstacle avoidance, how many sonar sensors we should use and at what distance if robot radius is round, about 50 cm ? |
Yes, this is correct
You can do it, but the thing is, the sonar resolution and range is very less right, so map building and obstacle avoidance using only sonar will not be sufficient. |
Using only sonar is not recommended but still, you can try , it will be better if you can have sonar in 360 degree. More sonar, more better will be the resolution. |
ok so i have purchased that ros project robotics books, it is great, thank you very much, reading it but so far good ok now i am doing chefbot bring up and i am getting the data using miniterm.py fine but it seems serial transmision is so fast from arduino so that rosserial python or launchpad_node.py is unable to cope up with it, so it is sync issue and it is closing down the serial connection, how to solve this issue? i am stuck in there |
Hi @Arvrairobo , If there are syncing issues, please reduce the baud rate. Can you check with 9600 baud? Change baud in both Arduino code and launchpad node |
ok let me check and confirm |
ok i have done 9600 baud rate it is better but still the problem. so rostopic echo /serial shows the data very fast and when i press ctrl + C to stop the data and then i see terminal window where i did launchpad.py it shows this warning [WARN] [1592904208.510559]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details. and then i again go to rostopic echo /serial no data i see just blinking, so it seems it is breaking the connection after some time? |
but then if i again start launchpad_node py, it automatically shows data in rostopic echo /serial but after sometime it just stuck and no new data it shows. |
@Arvrairobo Make sure the coming data is correct first, and when the data is stuck, just close the launchpad and test it with miniterm.py for checking data is still coming from arduino |
yes,i have confirmed, data is coming correct and now it is coming without any probem. but as soon as i press ctrl + c on rostopic echo /serial. it stops the launchpad and end with that warning that i pasted above and then if i run launchpad again then it automatically shows data on echo. so now the question is why rostopic echo /serial ctrl + c is ending the launchpad_node.py? so far working great |
ok i confirmed, even if i do ctrl + c and above scenerio happens, miniterm.py is showing the data |
so just to confirm again roslaunch launchpad_node.py shows below error [WARN] [1592905218.257550]: Inbound TCP/IP connection failed: connection from sender terminated before handshake header received. 0 bytes were received. Please check sender for additional details. and then if i open another terminal with rostopic echo /serial it shows nothing just blinking the cursor. but miniterm.py shows the data and as soon as i ctrl + c launchpad_node.py and again run launchpad_node.py, it shows data on rostopic echo /serial any suggestion? |
ok so far it is working fine, now the next problem i am facing roslaunch ChefBot_bringup robot_standalone.launch i did above, everything is launching fine then i did this roslaunch ChefBot_bringup keyboard_teleop.launch but real robot is not moving? it is publishing a twist message fine but robot is not moving. |
sorry to bother you, ignore all the above messages, they all are sorted. but i have a strange issue that is
|
what is the use of reset pin and green LED pin? if you shed some lights on it, that can help? |
You can reset the board by sending a reset command from the launchpad.py. One of the GPIO pin is connected to reset pin and when the GPIO pin is activated by the reset command, it will reset the board, it will help to reset the board from the command line itself. If any odometry error, then you can reset the board using this |
ok that makes sense, thank you for your help, but i am still stuck on this issue, may be i need to power the micro controllers with dedicated power suppy, right now i am powering up with USB from computer, so micro controller is getting power from computer as well as using the same USB to send or receive serial data, may be that is the case. i am talking about this for below issue:
also on some forum, they says that when you open serial monitor it resets the Arduino and thats why it is accepting serial values from python, is that possible? also some suggested that we need to wait on python side until we get the data and then only we write the serial data? i am not sure what solution could be? |
i am not finding any solution for that, if you could help me on that, that would be great |
Hi @Arvrairobo. Can you send a mail to [email protected]? I can share my contact number and we can have a voice interaction so that it can fix it early. Regards |
First of all great book and learnt many concepts from it but still somethings are confusing which i have listed below, if you can give me insights on it, that would be great.
i have seen the code and i am not getting some things in the code, if you could shed some lights that would be great.
i do see the sonar sensor that we are reading from arduino and receiving that in launch_node.py file and also publishing the sonar data on topic, but i dont see where it is subscribed and where that reading is been used?
there are 3 cliff sensor joint used in the xacro file which is left, right and front joint, what is that used for and how it is used in the real robot? also i dont see sonar sensor used in the xacro or urdf.
when i tried to run the the code on gazebo simulator with hotel map and viewed that on rviz, robot was able to move to the goal but it was taking lots of time and sometimes its just stuck on its place, spinning many times and then find new goal and then it goes to end goal but it was not that great, what is wrong with it?
Looking forward to hear from you.
The text was updated successfully, but these errors were encountered: