ros-foxy,ros-noetic Version of serial module installation
ros-melodic version:
sudo apt install ros-melodic-serial
linux下CH343 Module driver installation
假如你会发生以下ERROR
insmod: ERROR: could not insert module ch343.ko: Operation not permitted
- 需要进入bios界面 然后将安全模式关掉 否则无法insmod
假如内核版本过高编译失败(compilation error on pop os 21.10 with kernal 5.16.15)
- 高版本驱动 这个编译有问题 代码稍微改点就可以编译了
sudo sh wheeltec_udev.sh
catkin_make -DCATKIN_WHITELIST_PACKAGES=fdilink_ahrs # 或者使用catkin build
roslaunch fdilink_ahrs ahrs_driver.launch
其中device_type
:
-
- Deta-10的原始坐标系模式
-
- 单独imu的坐标系模式
rostopic echo /imu
调用的ahrs_driver节点会发布sensor_msgs/Imu
格式的imu topic。
std_msgs/Header header
uint32 seq
time stamp
string frame_id
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
float64[9] orientation_covariance
geometry_msgs/Vector3 angular_velocity
float64 x
float64 y
float64 z
float64[9] angular_velocity_covariance
geometry_msgs/Vector3 linear_acceleration
float64 x
float64 y
float64 z
float64[9] linear_acceleration_covariance
也会发布geometry_msgs/Pose2D
格式的二维指北角话题,话题名默认为/mag_pose_2d
。
float64 x
float64 y
float64 theta # 指北角
You can find the full instalition steps in ROS wiki http://wiki.ros.org/melodic/Installation/Ubuntu
(change it to your ROS1 distrbution, I use melodic dist.)
source /opt/ros/melodic/setup.bash
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/
catkin_make
sudo apt install ros-melodic-serial
cd ~/catkin_ws/src
git clone
cd ~/catkin_ws/src/fdilink_ahrs
sudo sh wheeltec_udev.sh
cd ../../
catkin_make -DCATKIN_WHITELIST_PACKAGES=fdilink_ahrs
Open two terminlas :
roscore #Terminal 1
roslaunch fdilink_ahrs ahrs_driver.launch #Terminal 2
If "No port found or cannot open port" error shown use this command"
sudo chown :gp /dev/ttyUSB0
Now you can list all the topics
rostopic list
To show any topic in the list use echo /(the topic name) e.g. :
rostopic echo /imu_data
Open new terminal and launch:
roslaunch fdilink_ahrs tf.launch
Open rviz
rviz
In rviz go to add >> By display type >> TF
Also in Global options