I am trying to attach 2 additional GPS sensors and 1 additional IMU sensor to the Rosbot 2.0.
How can I publish GPS sensor data and IMU sensor data to ros topic?
Do I need to modify the firmware to get data from this sensor?
If I need to modify the firmware, which materialshould I refer?
it mostly depends on the sensors you want to use. The easiest way is to connect the sensors via USB to ROSbot 2.0 Single Board Computer. Then you can make software on SBC.
What kind of sensors you want to use? Do you have datasheets of them?
I will use NEO-6M GPS 2ea and MPU-9250 1ea additionally.
I connect MPU-9250 on hSen2 and NEO-6M GPS in hSen4 and hSen5.
I follow assembly instruction for MPU-9250 connection in hSen2.
For two GPS sensors, I connect VCC-5V, GND-GND, RX-hSensX.pin3, and TX-hSensX.pin3, respectively.
The following figure shows the connection structure.
After that, maybe I have to add the library in lib file.
MPU9250 : MPU9250_Interface - interface imu mpu9250 | Mbed
NEO-6M GPS : GPS - read gps data | Mbed
What more do I need to do after adding the library?
I forgot to ask earlier. Which ROS do you want to use?
I use Ubuntu 18.04 + ROS melodic.
I edit rosbot-stm32-firmware to getting the motor pwm signal.
As Team Husarion, we will not be able to help you write dedicated code for a given sensor (unless in the form of an additional service). Are there any more ambiguities that need to be clarified so that you have a set of basic information to start work?
Okay, I understand.
If I want a software update that satisfies the above conditions, can I apply through the link below?
I try to make a firmware to use the additional sensors by myself.
I have a question about basic setting about Rosbot 2.0 core2.
In this robot, the hSens2 pins are empty as shown in figure below.
However, in the firmware code, SENS2_PIN3 and SENS2_PIN4 are defined by IMU_I2C_SCL and IMU_I2C_SDA like link below.
hSens2 was empty, but is it an unusable slot?
I am no sure if I understand this question. Can you elaborate?
March 24, 2023, 10:59am
hSens2 connector shares GPIO/I2C pins with IMU (BNO055). In theory, I2C bus allows to add more devices and you could do it, but it needs more work in firmware. And we do not guarantee that IMU will still work good enough after that. Therefore, it is not recommended to use this port, unless you still want to use IMU. Also, the pin 2 of this connector is an output from IMU interrupt signal, so you cannot use this MCU pin as an output too.
There was a phrase Custom robot design in the link, so I asked if I could get the robot software that I wanted if I contacted them there.
But now I’m trying to fix the firmware myself.
thank you for the reply.
So, is it possible to attach additional IMUs to hExt?
March 29, 2023, 12:12pm
yes. This is possible. hExt interface is designed to connect the devices like MPU-9250 (I2C interface) or NEO-6M GPS (UART interface).
What about hSen5?
Are these pins connected to the LED as in the code comments below?
This file has been truncated.
/* mbed Microcontroller Library
* Copyright (c) 2018, STMicroelectronics
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
We created this repository focusing on the “standard” peripherals of ROSbot 2(R) (PRO), which means that some interfaces are not included in the source code.
But you can write your own part of code, knowing which microcontroller pins are connected to the hSens5 and hExt ports. I prepared a cheatsheet for that purpose:
Remember that all hSens pins have the 660 ohm resistance in series, and all hExt pins have 330 ohm resistance in series.
I hope it helps.