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

Ros->Ign Bridge stops with signal 245 when JointStatePublisher is run #118

Open
09ubberboy90 opened this issue Oct 22, 2020 · 4 comments
Open
Labels
bug Something isn't working help wanted Extra attention is needed ROS 2 ROS 2

Comments

@09ubberboy90
Copy link
Contributor

09ubberboy90 commented Oct 22, 2020

If you run a bridge to publish joint_states from Ros2 to ignition with ros run ros_ign_bridge parameter_bridge /joint_states@sensor_msgs/msg/JointState@ignition.msgs.Model it works.

However if you run JointStatePublisher or JointStatePublisherGui with ros run joint_state_publisher joint_state_publisher and a Urdf file the bridge stops with no visible error beside signal 245 beeing sent
image

I tried changing the source topic and it still breaks. And using another data type for the bridge still works fine (float, int) with the JointStatePublisher

@osrf-triage osrf-triage added this to Inbox in Core development Oct 22, 2020
@chapulina chapulina added bug Something isn't working ROS 2 ROS 2 labels Oct 22, 2020
@chapulina
Copy link
Contributor

Thank you for ticketing the issue. Do you have a minimal launch file that can be used to test this issue?

Also, what Ignition version are you using?

@09ubberboy90
Copy link
Contributor Author

Hi sorry for the delay. I've been pretty busy. I am using ignition 4.0.0. I also have ignition 3.3.0 installed.

A simple launch file would be (once given a pkg and an urdf file with joints inside):

import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    pkg_name = "PKG_NAME"
    urdf_file = "URDF_FILE"
    pkg_share = get_package_share_directory(pkg_name)

    joint = Node(
        package='joint_state_publisher_gui',
        executable='joint_state_publisher_gui',
        output='screen',
        arguments=[os.path.join(pkg_share, urdf_file)],
    )

    bridge = Node(
        package='ros_ign_bridge',
        executable='parameter_bridge',
        arguments="/joint_states@sensor_msgs/msg/JointState@ignition.msgs.Model",
        output='screen'
    )

    return LaunchDescription([
        joint,
        bridge,
    ])

This causes an causes an [ERROR] [parameter_bridge-2]: process has died [pid 194342, exit code 255, cmd '/home/ubb/Documents/ros/bridge_ws/install/ros_ign_bridge/lib/ros_ign_bridge/parameter_bridge / j o i n t _ s t a t e s @ s e n s o r _ m s g s / m s g / J o i n t S t a t e @ i g n i t i o n . m s g s . M o d e l --ros-args']

along with the documentation of how to properly format the arguments. This seems to be due that the argument is malformed which is not the case in the launch file.

However running the same command in terminal doesn't seem to generate such an error (Nothing else is running). And the bridge only dies once the JointStatePublisher starts to publish. Not providing an urdf file doesn't crash the bridge as there is nothing beeing publish. So the error is probably in either the subscriber for JointStates or in the publisher for Model

image

@chapulina chapulina removed this from Inbox in Core development Jan 21, 2021
@chapulina chapulina added the help wanted Extra attention is needed label Jan 21, 2021
@mcaniot
Copy link

mcaniot commented Dec 13, 2021

I have the same problem using ignition citadel and ros foxy. When you launch the ign_bridge alone, there is no error message. You launch a node joint_state_publisher, an error message appear with command parameter_bridge. Same message using the demo code from ignition_bridge/ros_ign_gazebo_demos joint_states.launch.py.
[ERROR] [parameter_bridge-3]: process has died [pid 1841464, exit code -11, cmd '/home/Documents/test/install/ros_ign_bridge/lib/ros_ign_bridge/parameter_bridge /clock@rosgraph_msgs/msg/Clock@ignition.msgs.Clock /world/empty/model/rrbot/joint_state@sensor_msgs/msg/JointState@ignition.msgs.Model --ros-args -r /world/empty/model/rrbot/joint_state:=joint_states'].

@09ubberboy90
Copy link
Contributor Author

If I remember correctly I think it was due that in ignition the joint topic for control publishes to /model/{robot_name}/joint/{topic_name}/0/cmd_pos which causes problem because ros doesn't allow topic to start with a number. But then again I may have encountered this problem when trying to find a workaround.

Anyway until it is fixed I would recommend you create some sort of republisher that listen to joint_states in ros and publishes it in ignition. Here is my implementation of it. With some tweaking you can get something up and running quite fast.

Hope it helps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed ROS 2 ROS 2
Projects
None yet
Development

No branches or pull requests

3 participants