Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use bno055_params_i2c_yaml params file #70

Open
ARLunan opened this issue Apr 10, 2024 · 2 comments
Open

Unable to use bno055_params_i2c_yaml params file #70

ARLunan opened this issue Apr 10, 2024 · 2 comments

Comments

@ARLunan
Copy link

ARLunan commented Apr 10, 2024

Using i2c connection to bno055: After colcon build & source . install/setup.bash, execution error

ubuntu@rp4-ub22h-mt:/bno055_ws$ ros2 launch bno055 bno055.launch.py config:=bno055_params_i2c.yaml
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2024-04-09-20-10-01-391230-rp4-ub22h-mt-4494
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [bno055-1]: process started with pid [4495]
[bno055-1] Traceback (most recent call last):
[bno055-1] File "/home/ubuntu/bno055_ws/install/bno055/lib/bno055/bno055", line 33, in
.
.
[bno055-1] File "/home/ubuntu/bno055_ws/build/bno055/bno055/connectors/uart.py", line 33, in
[bno055-1] import serial
[bno055-1] ModuleNotFoundError: No module named 'serial'
[ERROR] [bno055-1]: process has died [pid 4495, exit code 1, cmd '/home/ubuntu/bno055_ws/install/bno055/lib/bno055/bno055 --ros-args --params-file /home/ubuntu/bno055_ws/install/bno055/share/bno055/config/bno055_params.yaml'].
ubuntu@rp4-ub22h-mt:
/bno055_ws$

Seems config i2c parameter file is ignored and the default serial params yaml is used.

Copy link

Thank you for creating your first issue on this repo! Give me some time to review and respond to your problem.

@ARLunan
Copy link
Author

ARLunan commented Apr 10, 2024

To further investigate, I added a new params/bno055_params_i2c_rp4.yaml with the following changes spec to the Raspberry Pi i2c configuration

ubuntu@rp4-ub22h-mt:~/bno055_ws/src/bno055/bno055/params$ cat bno055_params_i2c_rp4.yaml

Copyright 2021 AUTHORS

.
.

Example parameters for an I2C connection to the BNO055 motion sensor.

Revised ARLunan Apr 10, 2024 to configure for Rapsberry Pi i2C

bno055:
ros__parameters:
ros_topic_prefix: "bno055/"
connection_type: "i2c"
# i2c_bus: 0
i2c_b
Then run the following hoping for this new "rp4" yaml file to be loaded-but it was not, and still seems to open the "uart" port.

ubuntu@rp4-ub22h-mt:/bno055_ws$ ros2 run bno055 bno055 --ros-args --params-file ./src/bno055/bno055/params/bno055_params_i2c_rp4.yaml
Traceback (most recent call last):
File "/home/ubuntu/bno055_ws/install/bno055/lib/bno055/bno055", line 33, in
sys.exit(load_entry_point('bno055', 'console_scripts', 'bno055')())
File "/home/ubuntu/bno055_ws/install/bno055/lib/bno055/bno055", line 25, in importlib_load_entry_point
.
.
.
File "/home/ubuntu/bno055_ws/build/bno055/bno055/bno055.py", line 34, in
from bno055.connectors.uart import UART
File "/home/ubuntu/bno055_ws/build/bno055/bno055/connectors/uart.py", line 33, in
import serial
ModuleNotFoundError: No module named 'serial'
[ros2run]: Process exited with failure 1
ubuntu@rp4-ub22h-mt:
/bno055_ws$

Could you suggest different run files or edits to the configuration files to enable running an i2c configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant