some ROS drivers for the Beaglbone Blue
WIP!!! Ugly code included!!!
The drivers use the librobotcontrol library by StrawsonDesign
Nodes overview
- differential driver node using the onboard motor ports
- publisher for IMU messages from MPU9250
- publisher for battery state
TODO
and default values
- ~left_motor = 1
- ~right_motor = 2
- ~timeout = 5
- ~maxspeed = 0.4
- ~minspeed = 0.1
- ~wheelbase = 0.2
- ~turnspeed = 1
- ~duty_factor = 1 - velocity to PWM duty cycle factor (simple linear approach)
rosrun bbblue_drivers diff_motor_driver
rosrun bbblue_drivers diff_motor_driver _left_motor:=3 _right_motor:=4 _minspeed:=0.137 _maxspeed:=0.364 _duty_factor:=2.2
Publish to cmd_vel manually
`rostopic pub -1 /cmd_vel geometry_msgs/Twist -- '[1.0, 0.0, 0.0]' '[0.0, 0.0, 0]'``
and default values
- ~power_supply_technology = 3
- ~min_cell_voltage = 3.3 ( 0% )
- ~max_cell_voltage = 4.15 ( 100% )
rosrun bbblue_drivers battery_state
and default values
- ~frame_id = imu_link
- ~linear_acceleration_stddev = 0.04
- ~angular_velocity_stddev = 0.02
- ~orientation_stddev = 0.0025
- ~magnetometer_stddev = 0.04
covariances used from razor_imu_9dof https://github.com/KristofRobot/razor_imu_9dof/blob/indigo-devel/nodes/imu_node.py
Start the IMU node
rosrun bbblue_drivers imu_pub_node
A static transformation is required:
rosrun tf static_transform_publisher 0.0 0.0 0.0 0 0 0 map imu_link 10
The Beaglebone Blue has no display port. So for visualization an aditional system is required.
export ROS_MASTER_URI=http://rosbot:11311
Starting rviz after exporting the MASTER usxbrix
rviz
red - x green - y blue -z
sudo apt-get install ros-melodic-imu-tools
rosrun imu_filter_madgwick imu_filter_node
Pull requests and issues are welcome.