Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 8

Comment by 1024son for The linux account you are using to run ROS probably does not have read-write permission for the device /dev/i2c-0. As a quick hack, you can issue this command:sudo chmod 666 /dev/i2c-0but this will need to be repeated if you reboot the machine.The better thing to do is to create a udev rule which will change the permissions on this device each time the machine boots.

Previous: Answer by bcwadell for Hi all,I follow a tutorial in interfacing BNO055 sensor. It was connected to my Odroid C4 via SCL (pin 5) and SDA (pin 3) and also 3.3V & Gnd. Ran command sudo i2cdetect -r -y 0 returns shows the address to be 0x29.Ran the launch file and errors showed up. PARAMETERS * /imu/imu_node/address: 40 * /imu/imu_node/device: /dev/i2c-0 * /imu/imu_node/frame_id: imu * /rosdistro: noetic * /rosversion: 1.15.14 setting /run_id to 159765cc-9bc4-11ec-b5b8-001e06489d9b process[rosout-1]: started with pid [6737] started core service [/rosout] process[imu/imu_node-2]: started with pid [6744] terminate called after throwing an instance of 'std::runtime_error' what(): i2c device open failed[imu/imu_node-2] process has died [pid 6744, exit code -6, cmd /home/odroid/catkin_ws/devel/lib/imu_bno055/bno055_i2c_node __name:=imu_node __log:=/home/odroid/.ros/log/159765cc-9bc4-11ec-b5b8-001e06489d9b/imu-imu_node-2.log].log file: /home/odroid/.ros/log/159765cc-9bc4-11ec-b5b8-001e06489d9b/imu-imu_node-2*.logI have already edited the launch file, changing the device path to /dev/i2c-0 and also the address to 0x29.Thank you.Answer: For i2c device open failed, run command sudo chmod 666 /dev/i2c-0For incorrect chip id,Change the launch file address to <launch> <node ns="imu" name="imu_node" pkg="imu_bno055" type="bno055_i2c_node" respawn="true" respawn_delay="2"> <param name="device" type="string" value="/dev/i2c-0"/> <param name="address" type="int" value="41"/> <!-- 0x29 == 40 is the default for BNO055 --> <param name="frame_id" type="string" value="imu"/> </node> </launch>*0x29 is 41 and 0x28 is 40
$
0
0
Thanks for replying. after running `sudo chmod 666 /dev/i2c-0`, the error message changes `what(): i2c device open failed` to `what(): incorrect chip ID`. The full error: `PARAMETERS * /imu/imu_node/address: 40 * /imu/imu_node/device: /dev/i2c-0 * /imu/imu_node/frame_id: imu * /rosdistro: noetic * /rosversion: 1.15.14` `NODES /imu/ imu_node (imu_bno055/bno055_i2c_node)` `ROS_MASTER_URI=http://localhost:11311` `process[imu/imu_node-1]: started with pid [4568] terminate called after throwing an instance of 'std::runtime_error' what(): incorrect chip ID` `[imu/imu_node-1] process has died [pid 4568, exit code -6, cmd /home/odroid/catkin_ws/devel/lib/imu_bno055/bno055_i2c_node __name:=imu_node __log:=/home/odroid/.ros/log/dec645e4-9e44-11ec-bc5c-001e06489d9b/imu-imu_node-1.log].` `log file: /home/odroid/.ros/log/dec645e4-9e44-11ec-bc5c-001e06489d9b/imu-imu_node-1*.log ^C[imu/imu_node-1] killing on exit shutting down processing monitor...`

Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>