Giter Club home page Giter Club logo

Comments (4)

chapulina avatar chapulina commented on August 22, 2024

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?

from ros_gz.

09ubberboy90 avatar 09ubberboy90 commented on August 22, 2024

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/[email protected]",
        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

from ros_gz.

mcaniot avatar mcaniot commented on August 22, 2024

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/[email protected] /world/empty/model/rrbot/joint_state@sensor_msgs/msg/[email protected] --ros-args -r /world/empty/model/rrbot/joint_state:=joint_states'].

from ros_gz.

09ubberboy90 avatar 09ubberboy90 commented on August 22, 2024

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

from ros_gz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.