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

Segmentation fault on Raspberry Pi #3

Open
Lucasmogsan opened this issue Jun 5, 2024 · 0 comments
Open

Segmentation fault on Raspberry Pi #3

Lucasmogsan opened this issue Jun 5, 2024 · 0 comments

Comments

@Lucasmogsan
Copy link

Lucasmogsan commented Jun 5, 2024

Hi,
First thanks for your work on the Oculus driver and ROS 2 node!

My problem:

I am trying to run this on

  • RPi (Raspbian 13.1-3), 32-bit
  • ROS humble
  • CMake 3.25.1.

I have checked and verified that network connection to the Oculus is working. However it seems like I get some memory error and I cannot really figure out why. Could it be related to me running 32 bit (which i unfortunately need to, do to other requirements)

I hope you can help me out. Thanks.

Outputs from terminal on RPi:

Running the default launch file I get:
spc-admin@spc:~/ros2_humble $ ros2 launch oculus_ros2 default.launch.py
[INFO] [launch]: All log files can be found below /home/spc-admin/.ros/log/2024-06-05-14-05-27-521786-spc-25740
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [oculus_sonar_node-1]: process started with pid [25744]
[oculus_sonar_node-1] [DEBUG] [1717596328.301457887] [rclcpp]: signal handler installed
[oculus_sonar_node-1] [DEBUG] [1717596328.302093646] [rcl]: Initializing node 'oculus_sonar' in namespace ''
[oculus_sonar_node-1] [DEBUG] [1717596328.302264516] [rcl]: Using domain ID of '0'
[oculus_sonar_node-1] [DEBUG] [1717596328.341328757] [rcl]: Initializing publisher for topic name '/rosout'
[oculus_sonar_node-1] [DEBUG] [1717596328.341489701] [rcl]: Expanded and remapped topic name '/rosout'
[oculus_sonar_node-1] [DEBUG] [1717596328.347776498] [rcl]: Publisher initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.347912868] [rcl]: Node initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.301505776] [rclcpp]: deferred_signal_handler(): waiting for SIGINT/SIGTERM or uninstall
[oculus_sonar_node-1] [DEBUG] [1717596328.352460701] [rcl]: Initializing service for service name 'oculus_sonar/get_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.352587813] [rcl]: Expanded and remapped service name '/sonar/oculus_sonar/get_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.355090424] [rmw_fastrtps_cpp]: ************ Service Details *********
[oculus_sonar_node-1] [DEBUG] [1717596328.355194479] [rmw_fastrtps_cpp]: Sub Topic rq/sonar/oculus_sonar/get_parametersRequest
[oculus_sonar_node-1] [DEBUG] [1717596328.355220627] [rmw_fastrtps_cpp]: Pub Topic rr/sonar/oculus_sonar/get_parametersReply
[oculus_sonar_node-1] [DEBUG] [1717596328.355244313] [rmw_fastrtps_cpp]: ***********
[oculus_sonar_node-1] [DEBUG] [1717596328.355848868] [rcl]: Service initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.356672887] [rcl]: Initializing service for service name 'oculus_sonar/get_parameter_types'
[oculus_sonar_node-1] [DEBUG] [1717596328.356789220] [rcl]: Expanded and remapped service name '/sonar/oculus_sonar/get_parameter_types'
[oculus_sonar_node-1] [DEBUG] [1717596328.358443127] [rmw_fastrtps_cpp]: ************ Service Details *********
[oculus_sonar_node-1] [DEBUG] [1717596328.358544405] [rmw_fastrtps_cpp]: Sub Topic rq/sonar/oculus_sonar/get_parameter_typesRequest
[oculus_sonar_node-1] [DEBUG] [1717596328.358571220] [rmw_fastrtps_cpp]: Pub Topic rr/sonar/oculus_sonar/get_parameter_typesReply
[oculus_sonar_node-1] [DEBUG] [1717596328.358594442] [rmw_fastrtps_cpp]: ***********
[oculus_sonar_node-1] [DEBUG] [1717596328.358854405] [rcl]: Service initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.359513553] [rcl]: Initializing service for service name 'oculus_sonar/set_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.359626090] [rcl]: Expanded and remapped service name '/sonar/oculus_sonar/set_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.361245238] [rmw_fastrtps_cpp]: ************ Service Details *********
[oculus_sonar_node-1] [DEBUG] [1717596328.361345109] [rmw_fastrtps_cpp]: Sub Topic rq/sonar/oculus_sonar/set_parametersRequest
[oculus_sonar_node-1] [DEBUG] [1717596328.361371109] [rmw_fastrtps_cpp]: Pub Topic rr/sonar/oculus_sonar/set_parametersReply
[oculus_sonar_node-1] [DEBUG] [1717596328.361394109] [rmw_fastrtps_cpp]: ***********
[oculus_sonar_node-1] [DEBUG] [1717596328.361665961] [rcl]: Service initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.362341905] [rcl]: Initializing service for service name 'oculus_sonar/set_parameters_atomically'
[oculus_sonar_node-1] [DEBUG] [1717596328.362452905] [rcl]: Expanded and remapped service name '/sonar/oculus_sonar/set_parameters_atomically'
[oculus_sonar_node-1] [DEBUG] [1717596328.364137238] [rmw_fastrtps_cpp]: ************ Service Details *********
[oculus_sonar_node-1] [DEBUG] [1717596328.364232627] [rmw_fastrtps_cpp]: Sub Topic rq/sonar/oculus_sonar/set_parameters_atomicallyRequest
[oculus_sonar_node-1] [DEBUG] [1717596328.364259053] [rmw_fastrtps_cpp]: Pub Topic rr/sonar/oculus_sonar/set_parameters_atomicallyReply
[oculus_sonar_node-1] [DEBUG] [1717596328.364282035] [rmw_fastrtps_cpp]: ***********
[oculus_sonar_node-1] [DEBUG] [1717596328.364549109] [rcl]: Service initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.365180053] [rcl]: Initializing service for service name 'oculus_sonar/describe_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.365291664] [rcl]: Expanded and remapped service name '/sonar/oculus_sonar/describe_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.366964590] [rmw_fastrtps_cpp]: ************ Service Details *********
[oculus_sonar_node-1] [DEBUG] [1717596328.367060701] [rmw_fastrtps_cpp]: Sub Topic rq/sonar/oculus_sonar/describe_parametersRequest
[oculus_sonar_node-1] [DEBUG] [1717596328.367085646] [rmw_fastrtps_cpp]: Pub Topic rr/sonar/oculus_sonar/describe_parametersReply
[oculus_sonar_node-1] [DEBUG] [1717596328.367108664] [rmw_fastrtps_cpp]: ***********
[oculus_sonar_node-1] [DEBUG] [1717596328.367364479] [rcl]: Service initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.367979035] [rcl]: Initializing service for service name 'oculus_sonar/list_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.368092590] [rcl]: Expanded and remapped service name '/sonar/oculus_sonar/list_parameters'
[oculus_sonar_node-1] [DEBUG] [1717596328.369741442] [rmw_fastrtps_cpp]: ************ Service Details *********
[oculus_sonar_node-1] [DEBUG] [1717596328.369936905] [rmw_fastrtps_cpp]: Sub Topic rq/sonar/oculus_sonar/list_parametersRequest
[oculus_sonar_node-1] [DEBUG] [1717596328.369972627] [rmw_fastrtps_cpp]: Pub Topic rr/sonar/oculus_sonar/list_parametersReply
[oculus_sonar_node-1] [DEBUG] [1717596328.369997405] [rmw_fastrtps_cpp]: ***********
[oculus_sonar_node-1] [DEBUG] [1717596328.370331090] [rcl]: Service initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.370878979] [rcl]: Initializing publisher for topic name '/parameter_events'
[oculus_sonar_node-1] [DEBUG] [1717596328.370989183] [rcl]: Expanded and remapped topic name '/parameter_events'
[oculus_sonar_node-1] [DEBUG] [1717596328.376457257] [rcl]: Publisher initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.381904794] [rcl]: Initializing subscription for topic name '/parameter_events'
[oculus_sonar_node-1] [DEBUG] [1717596328.382044387] [rcl]: Expanded and remapped topic name '/parameter_events'
[oculus_sonar_node-1] [DEBUG] [1717596328.383583646] [rcl]: Subscription initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.386685720] [rcl]: Initializing publisher for topic name 'image'
[oculus_sonar_node-1] [DEBUG] [1717596328.386813257] [rcl]: Expanded and remapped topic name '/sonar/image'
[oculus_sonar_node-1] [DEBUG] [1717596328.395417905] [rcl]: Publisher initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.396752942] [rcl]: Initializing publisher for topic name 'status'
[oculus_sonar_node-1] [DEBUG] [1717596328.396868961] [rcl]: Expanded and remapped topic name '/sonar/status'
[oculus_sonar_node-1] [DEBUG] [1717596328.401588683] [rcl]: Publisher initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.401893498] [rcl]: Initializing publisher for topic name 'ping'
[oculus_sonar_node-1] [DEBUG] [1717596328.401965553] [rcl]: Expanded and remapped topic name '/sonar/ping'
[oculus_sonar_node-1] [DEBUG] [1717596328.403807516] [rcl]: Publisher initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.404128294] [rcl]: Initializing publisher for topic name 'temperature'
[oculus_sonar_node-1] [DEBUG] [1717596328.404207998] [rcl]: Expanded and remapped topic name '/sonar/temperature'
[oculus_sonar_node-1] [DEBUG] [1717596328.405634627] [rcl]: Publisher initialized
[oculus_sonar_node-1] [DEBUG] [1717596328.405946238] [rcl]: Initializing publisher for topic name 'pressure'
[oculus_sonar_node-1] [DEBUG] [1717596328.406038313] [rcl]: Expanded and remapped topic name '/sonar/pressure'
[oculus_sonar_node-1] [DEBUG] [1717596328.407567979] [rcl]: Publisher initialized
[oculus_sonar_node-1] oculus::StatusListener : listening to remote : 0.0.0.0:52102
[oculus_sonar_node-1] starting
[oculus_sonar_node-1] Got Oculus status
[oculus_sonar_node-1] - netip : 192.168.2.4
[oculus_sonar_node-1] - netmask : 255.255.255.0
[oculus_sonar_node-1] Connection successful (192.168.2.4:52100)
[oculus_sonar_node-1] [INFO] [1717596330.172769645] [sonar.oculus_sonar]: Updating frequency_mode to 1 (1: 1.2MHz, 2: 2.1MHz).
[ERROR] [oculus_sonar_node-1]: process has died [pid 25744, exit code -7, cmd '/home/spc-admin/ros2_humble/install/oculus_ros2/lib/oculus_ros2/oculus_sonar_node --ros-args --log-level DEBUG --ros-args -r __node:=oculus_sonar -r __ns:=/sonar --params-file /home/spc-admin/ros2_humble/install/oculus_ros2/share/oculus_ros2/cfg/default.yaml -r status:=status -r ping:=ping -r temperature:=temperature -r pressure:=pressure'].

When running without the launch file:
spc-admin@spc:~/ros2_humble $ /home/spc-admin/ros2_humble/install/oculus_ros2/lib/oculus_ros2/oculus_sonar_node --ros-args -r __node:=oculus_sonar -r __ns:=/sonar --params-file /home/spc-admin/ros2_humble/install/oculus_ros2/share/oculus_ros2/cfg/default.yaml -r status:=status -r ping:=ping -r temperature:=temperature -r pressure:=pressure
oculus::StatusListener : listening to remote : 0.0.0.0:52102
starting
Got Oculus status

  • netip : 192.168.2.4
  • netmask : 255.255.255.0
    Connection successful (192.168.2.4:52100)
    [INFO] [1717596279.817236767] [sonar.oculus_sonar]: Updating frequency_mode to 1 (1: 1.2MHz, 2: 2.1MHz).
    Bus error

Running through gdb:
`spc-admin@spc:~/ros2_humble $ gdb --args /home/spc-admin/ros2_humble/install/oculus_ros2/lib/oculus_ros2/oculus_sonar_node --ros-args -r __node:=oculus_sonar -r __ns:=/sonar --params-file /home/spc-admin/ros2_humble/install/oculus_ros2/share/oculus_ros2/cfg/default.yaml -r status:=status -r ping:=ping -r temperature:=temperature -r pressure:=pressure
GNU gdb (Raspbian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "arm-linux-gnueabihf".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type "help".
--Type for more, q to quit, c to continue without paging--run
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/spc-admin/ros2_humble/install/oculus_ros2/lib/oculus_ros2/oculus_sonar_node...
(gdb) run
Starting program: /home/spc-admin/ros2_humble/install/oculus_ros2/lib/oculus_ros2/oculus_sonar_node --ros-args -r __node:=oculus_sonar -r __ns:=/sonar --params-file /home/spc-admin/ros2_humble/install/oculus_ros2/share/oculus_ros2/cfg/default.yaml -r status:=status -r ping:=ping -r temperature:=temperature -r pressure:=pressure
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0xece5dec0 (LWP 13685)]
[New Thread 0xec65cec0 (LWP 13686)]
[New Thread 0xebdd4ec0 (LWP 13687)]
[New Thread 0xeb5d3ec0 (LWP 13688)]
[New Thread 0xeadd2ec0 (LWP 13689)]
[New Thread 0xea5d1ec0 (LWP 13690)]
[New Thread 0xe9dd0ec0 (LWP 13691)]
[New Thread 0xe950fec0 (LWP 13692)]
[New Thread 0xe8bfdec0 (LWP 13693)]
oculus::StatusListener : listening to remote : 0.0.0.0:52102
starting
[New Thread 0xe811eec0 (LWP 13701)]
Got Oculus status

  • netip : 192.168.2.4
  • netmask : 255.255.255.0
    Connection successful (192.168.2.4:52100)
    [INFO] [1717592523.943239302] [sonar.oculus_sonar]: Updating frequency_mode to 1 (1: 1.2MHz, 2: 2.1MHz).

Thread 1 "oculus_sonar_no" received signal SIGBUS, Bus error.
0x00084018 in OculusSonarNode::handleFeedbackForParam (this=0x4fe2f0, result=..., param=...,
old_val=@0xfffdd75d: 0, new_val=@0xfffdd725: 0, param_name="range")
at /home/spc-admin/ros2_humble/src/oculus_ros2/oculus_ros2/include/oculus_ros2/oculus_sonar_node.hpp:224
224 if (old_val != new_val) {

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