[Solved] Moving ROSBot 2.0?

Hello Everyone,
I have recently bought RosBot 2.0 from husarion company for my research purpose. Actually I am trying to look for a tutorial through which I can run the real RosBot 2.0 for the first time by implementing the obstacle avoidance algorithm. Any help will be appreciated. Thanks

Hi,
I’m not sure if I understand correctly but here is a link to tutorial which allows you to drive autonomously on some map with obstacle avoidance. Let me know if that is what you were looking for :slight_smile:.

Best regards,
Karol Konkol
Husarion Team

1 Like

Hi Karol_Konkol,
First of all thanks for reply. I have tried the following URL to get the camera output, and obtained the video from the ROSbot camera successfully.
(ROS Introduction | Husarion)
My question is that how can we run this ROSbot? How to program the wheels actuators? Is there any tutorial to get help for working with wheels so that ROSbot can walk?
Any small tutorial based support can be very helpful for me.


Thanks and Best Regards!

1 Like

Hi,
If you want to do it on ROS level there is cmd_vel topic which has to information angular velocity and linear velocity (geometry_msgs/Twist Documentation) if you want to turn you have to change angular velocity in z axis and if you want to go forward you have to change linear velocity in x axis. If you want to work on hardware here is a link rosbot-stm32-firmware/rosbot_kinematics.cpp at main · husarion/rosbot-stm32-firmware · GitHub.

Best regards
Karol Konkol
Husarion Team

1 Like

Hi,
I just go through the following hardware link,
[rosbot-stm32-firmware/rosbot_kinematics.cpp at main · husarion/rosbot-stm32-firmware · GitHub]
I didn’t find anything to be helpful while running rosbot for the first time. Which file need to be run? How the command needs to be executed? Please help me as I am using ROSbot for the very first time.

Thanks

1 Like

Hi,
the easiest way is to use ROS and we have tutorial regard to this topic Simple kinematics for mobile robot | Husarion.

Best regards
Karol Konkol
Husarion Team

1 Like

Hi,
I have received your message on forum about moving ROSbot. I am still facing errors while executing the 3 commands in 3 terminals as the link suggest. [Simple kinematics for mobile robot | Husarion].
In first terminal i successfully run the ‘roscore’ command.
In second terminal when I type 'roslaunch rosbot_ekf all.launch’I got the following error.
RLException: ERROR: could not contact master [http://192.168.100.131]
The traceback for the exception was written to the log file

Please help me to resolve the issue. So that i could be able to solve the issue while moving ROSbot for the first time.

Thanks & Best Regards

Hi,
The roslaunch command first launch roscore ( if it’s not launched already ) so here the problem is probably with address of ROS master. Could you send me your .bashrc file and also try to run only second command ( 'roslaunch rosbot_ekf all.launch’ ) and please send me whole output of that command.

Best regards
Karol Konkol
Husarion Team

1 Like

Actually I am using the following link to run my ROSbot.

I have written following 3 commands on 3 different terminals from the above link.

roscore
roslaunch rosbot_ekf all.launch
rosrun teleop_twist_keyboard teleop_twist_keyboard.py

But after writing 3 number command in 3rd terminal I am getting only following message on terminal.

Waiting for subscriber to connect to /cmd_vel

When I press ‘i’ for moving robot in forward direction as given in tutorial then my robot is still not willing to move.

Is there any thing wrong done by me? Can my robot move? How can I resolve this issue?

Thank you!

Hi,
I don’t know the correct answer yet. Could you type rostopic list in terminal in which you are running rosrun teleop_twist_keyboard teleop_twist_keyboard.py before typing this command and look for / cmd_vel topic. Let me know if it’s there. And also it would be helpful if you send me the .bashrc file (10 last lines is enough :slight_smile: ).

Best regards
Karol Konkol
Husarion Team

1 Like

Hi,
In first terminal I type roscore and run.
In second terminal I type roslaunch rosbot_ekf all.launch and run.
In third terminal first of all I type rostopic list and run, then I get the following outpu.

/imu
/mpu9250
/odom/wheel
/pose
/rosout
/rosout_agg
/tf

After running above command I then type rosrun teleop_twist_keyboard teleop_twist_keyboard.py in third terminal, I again getting the following same message on third terminal, and robot is not moving, and static on my table.

Waiting for subscriber to connect to /cmd_vel

However I had pressed ‘i’ , ‘f’ etc for moving but no vain.

Please suggest me the solution so that I can be able to move the ROSbot 2.0.

Can you please tell me that where the .bashrc file is located in husarion operating system, so that I can easily send this file to you.

Thanks & Best Regards

Hi,
after rostopic list command you should see more topics then those you sent me so it can be problem with firmware. It can be caused by upgrading system and not flashing firmware or same changes in ROS environment because of that you should at first try to flash firmware, open terminal and type ./flashfirmware.sh then try to move rosbot (you can also look at topics rostopic list). If that won’t help you should download new image from here, if you need help here is tutorial. Also please send me which version of ROS you have and you please send me serial number in private message :slight_smile:.

Best regards
Karol Konkol
Husarion Team

1 Like

Hi,
I type rosversion -d in the terminal and get melodic

I type ./flashfirmware.sh in the terminal and get

bash: ./flashfirmware.sh: No such file or directory

I also type lsb_release -a in the terminal and get following output.

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

I also run uname -r in terminal, and get 5.4.91

I also run uname -m in terminal, and get armv7l

I am using ROSbot 2.0.

I also have sent s/n of ROSbot in private message.

Hopefully this information can be helpful while moving my rosbot.

Thanks & Best Regards

Hi,
I’m sorry the name of the file is ./flash_firmware.sh you can check it on your own with ls command, if that won’t work just reinstall system with tutorial I sent you and then you have to flash firmware.

Best regards
Karol Konkol
Husarion Team

1 Like

Hi,
I type ./flash_firmware.sh in terminal and get following output.

Bootloader version: 0x31
Chip id: 0x413 (STM32F405xx/07xx and STM32F415xx/17xx)
Supply -f [family] to see flash size and device UID, e.g: -f F1
read unprotect done
write unprotect done
Bootloader version: 0x31
Chip id: 0x413 (STM32F405xx/07xx and STM32F415xx/17xx)
Supply -f [family] to see flash size and device UID, e.g: -f F1
Extended erase (0x44), this can take ten seconds or more
Write 575 chunks at address 0x8000000…
[====================] 100.0% address:0x8023e00
Writing finished!
Read 575 chunks at address 0x8000000…
[====================] 100.0% address:0x8023e00
Reading finished!
Verification OK

After that I again type following three commands in 3 separate terminals in order to make the robot move.

roscore
roslaunch rosbot_ekf all.launch
rosrun teleop_twist_keyboard teleop_twist_keyboard.py

However after running three number command I again getting the same message, and robot is not moving on pressing i.

Waiting for subscriber to connect to /cmd_vel

Please help me to resolve my issue.

Best Regards!

Hi,
because ./flash_firmware.sh didn’t work you have to do next step which is reinstalling system here is tutorial how to do it. Let me know after you do that.

Best regards
Karol Konkol
Husarion Team

2 Likes

Hi,
Thanks for the reply, May I get an opportunity to have a short meeting with you Please.

Hi,
I am trying to run the following link.
https://husarion.com/tutorials/other-tutorials/rosbot-and-ws2812b-led-signalization/#introduction

For that I type the following command in terminal as mentioned in the above link.
sudo apt-get install ros-kinetic-robot-localization

After running command in terminal I got following message.

Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package ros-kinetic-robot-localization

Any way to run this command without error.

Thanks

1 Like

Hi,
Did you try to reinstall system? If yes please let me know if the same errors still occurs.
Regarding sudo apt-get install ros-kinetic-robot-localization try ros-melodic-robot-localization

Best regards
Karol Konkol
Husarion Team

1 Like

Hi,
I have successfully reinstall the software using the tutorial. Please let me know which commands should I run first. So that there may be no error while making ROSbot move in real.

Thanks

1 Like