SmartArmStack / smart_arm_stack_ROS2

Modularized robot control for ROS 2 Humble in Ubuntu 22.04.
2 stars 0 forks source link

[BUG] Unknown issing in sas_operator_side_reciever causeing sas_operator_side_reciever_udp_node SIGSEGV termination when launched #1

Open qlin960618 opened 1 month ago

qlin960618 commented 1 month ago

Hi @mmmarinho ,

Bug description

while trying out the sas package under ros2, I seem to be runnign into issue with the research only package sas_operator_side_reciever where when running the program would result in SIGSEGV on start. I am not sure if this is issue is related to my Environment setup (althouth I suspect not, since I can run the example proviced in the ROS2 AISP control template)

To Reproduce

with the following launch defninition in code, the output result in segfault

➜  launch git:(ros2) ✗ ros2 launch test_operator_side_receiver.py           
[INFO] [launch]: All log files can be found below /home/qlin/.ros/log/2024-07-28-19-30-19-202566-qlin-virtual-machine-117437
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [sas_operator_side_receiver_udp_node-1]: process started with pid [117438]
[ERROR] [sas_operator_side_receiver_udp_node-1]: process has died [pid 117438, exit code -11, cmd '/opt/ros/humble/lib/sas_operator_side_receiver/sas_operator_side_receiver_udp_node --ros-args --log-level debug --ros-args --params-file /tmp/launch_params_i76m3nbp'].

Please let me know if there is any information you need to maybe reproduce this.

Some attempt to debug further with strace and gdb I am not sure if there is sufficient infomation.

in gdb

Reading symbols from /opt/ros/humble/lib/sas_operator_side_receiver/sas_operator_side_receiver_udp_node...
(No debugging symbols found in /opt/ros/humble/lib/sas_operator_side_receiver/sas_operator_side_receiver_udp_node)
(gdb) run
Starting program: /opt/ros/humble/lib/sas_operator_side_receiver/sas_operator_side_receiver_udp_node --ros-args\ --log-level\ debug\ --ros-args\ --params-file\ /tmp/launch_params_vbuorfa5
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7c1f7e8 in rclcpp::Node::get_logger() const () from /opt/ros/humble/lib/librclcpp.so
(gdb) 

in strace

read(4, "/**:\n  ros__parameters:\n    oper"..., 16384) = 183
read(4, "", 12288)                      = 0
read(4, "", 16384)                      = 0
close(4)                                = 0
access("/", F_OK)                       = 0
access("/home", F_OK)                   = 0
access("/home/qlin", F_OK)              = 0
access("/home/qlin/.ros", F_OK)         = 0
access("/home/qlin/.ros/log", F_OK)     = 0
newfstatat(AT_FDCWD, "/home/qlin/.ros/log", {st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
getpid()                                = 104014
newfstatat(AT_FDCWD, "/home/qlin/.ros/log", {st_mode=S_IFDIR|0775, st_size=4096, ...}, 0) = 0
openat(AT_FDCWD, "/home/qlin/.ros/log/sas_operator_side_receiver_udp_node_104014_1722159649585.log", O_WRONLY|O_CREAT|O_APPEND, 0666) = 4
lseek(4, 0, SEEK_END)                   = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x38} ---
+++ killed by SIGSEGV (core dumped) +++

Code

#!/usr/bin/env python3
from launch import LaunchDescription
from launch_ros.actions import Node
import os
VREP_IP = os.environ['VREP_IP']
def generate_launch_description():
    node_operator_receiver = Node(
        package='sas_operator_side_receiver',
        executable ="sas_operator_side_receiver_udp_node",
        # name='operator_side_receiver',
        parameters=[{
            "patient_side_ips": ["10.198.113.121"],
            "patient_side_ports": [2233],
            "operator_side_ports": [2234],
        }],
        arguments=['--ros-args', '--log-level', 'debug']
    )

    return LaunchDescription([
        node_operator_receiver,
    ])

Environment

mmmarinho commented 1 month ago

@qlin960618 ~This package has never been tested on jammy. Does it work in humble as intended?~ Ok, this was a mixup with jazzy (sweet potato, blame the similar names). Lemme see what's up with this. Is there any example that uses this package?

qlin960618 commented 1 month ago

@mmmarinho, Not yet any specific example yet really.... just encountering this during my weekend project of begin porting some item that I am doing to ROS2.

mmmarinho commented 1 month ago

@qlin960618 I can confirm this one hasn't been tested in ROS2 yet. You can rely either on the packages in the AISP example (those I've tested), or on the ones I've been using in jazzy.

https://github.com/SmartArmStack/smart_arm_stack_ROS2/tree/jazzy

qlin960618 commented 1 month ago

@mmmarinho , I think this branch's install.sh is still pointing to the humble precompiled binary right? the "Research only" package

mmmarinho commented 1 month ago

@qlin960618 There are no precompiled binaries for jazzy yet. As you know, I'm locked out of the UTokyo computers so it will be a while until I can set something up.

The packages listed on the repository I linked are the ones I'm actively using. I'm not using the teleoperation ones yet.

qlin960618 commented 1 month ago

@mmmarinho Oh, I see! Remember you mentioned it a while back about the VNC licensing changes. I was under the impression that you had managed to changed the remote tool before you lost access. It is not urgent for me, but in any case you feel you need to regain access please let me know. I can physically be present to install the RDP tool for you.