ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Hakaishin's profile - activity

2023-07-31 05:56:01 -0500 marked best answer Second Image publisher has reset filename as '--ros-args' instead of rtsp stream, why?

I'm using ros2 and image_publisher, I have two image_publisher nodes to convert two rtsp streams to ros2 image streams, but the second stream does not work. I am using following launch file:

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():
    base_config_path = os.path.join(get_package_share_directory('project'), 'config')
    image_publisher_config0 = os.path.join(base_config_path, "image_publisher0.yaml")
    image_publisher_config1 = os.path.join(base_config_path, "image_publisher1.yaml")
    return LaunchDescription([
        Node(
            package='image_publisher',
            executable='image_publisher_node',
            namespace='cam0',
            parameters=[image_publisher_config0],
        ),
        Node(
            package='image_publisher',
            executable='image_publisher_node',
            namespace='cam1',
            parameters=[image_publisher_config1],
        )
    ])

and I'm using following two config files:

cam[0/1]/ImagePublisher:
  ros__parameters:
    filename: rtsp://10.11.12.2[0/1]/live_stream
    publish_rate: 25.0
    frame_id: world

Now the first stream starts normally and everything works, but the second stream somehow doesn't take the filename parameter. This seems odd, because the configs are exactly the same besides the namespace differences of 0/1. Node cam0 outputs: Reset filename as rtsp://10.11.12.20/live_stream but Node cam1 outputs: Reset filename as '--ros-args'. Why is that and how can I fix it?

2023-07-31 05:56:01 -0500 received badge  Self-Learner (source)
2023-07-31 05:55:42 -0500 received badge  Famous Question (source)
2023-07-27 14:06:11 -0500 received badge  Famous Question (source)
2023-06-30 11:26:16 -0500 marked best answer How to get ros2 param list to work with simple custom node?

I have following test.cpp:

#include <project/test.h>

void signalHandler(int signum){
    std::cerr << "Received signal" << std::endl;
    rclcpp::shutdown();
}

int main(int argc, char * argv[])
{
    signal(SIGTERM, signalHandler);

    rclcpp::init(argc, argv);

    rclcpp::executors::SingleThreadedExecutor exe;

    std::shared_ptr<Foo> lc_node = std::make_shared<Foo>();

    exe.add_node(lc_node->get_node_base_interface());
    exe.spin();
//    rclcpp::shutdown();
    std::cerr << "Closed" << std::endl;
    return 0;
}

with test.h just being:

#include <rclcpp/rclcpp.hpp>
#include <rclcpp_lifecycle/lifecycle_node.hpp>

class Foo : public rclcpp_lifecycle::LifecycleNode {
public:
    Foo() : rclcpp_lifecycle::LifecycleNode("foo"){
        std::cerr << "Running test node" << std::endl;
    };

private:

};

now I can run the node successfully directly from clion and everything works, callbacks get called topics get published and I see my published markers in rviz. Now I wanted to integrate with rqt but when I try to click on the node it just freezes and gives me following error message:

[WARN] [1630415189.108735450] [rqt_reconfigure]: Failed to retrieve parameters from node: asynchronous service call failed: the target node may not be spinning

ros2 param list returns Exception while calling service of node '/foo': None

What am I missing? Why can't I get the parameters of my node?

2023-01-09 01:47:50 -0500 received badge  Popular Question (source)
2023-01-09 01:47:50 -0500 received badge  Notable Question (source)
2022-11-16 12:17:45 -0500 received badge  Famous Question (source)
2022-09-13 11:26:54 -0500 received badge  Famous Question (source)
2022-09-13 11:26:54 -0500 received badge  Popular Question (source)
2022-09-13 11:26:54 -0500 received badge  Notable Question (source)
2022-07-23 11:38:34 -0500 received badge  Nice Question (source)
2022-07-23 11:38:31 -0500 marked best answer How to speed up map building with gmapping?

I have a pipeline that tries different parameters of gmapping and save the results to a folder. After letting them run I can just examine the pictures and see which maps turned out well and chose those parameters in the future. Now my rosbag that I play is 6 minutes longs, so every run takes 6 minutes with the amount of parameters there are in gmapping it would take days to test even the most important ones. Now I know I can replay the rosbags at a faster rate, but when I do that gmapping creates very strange looking maps and they are all distorted. I am using "rosparam set use_sim_time True" before running my bag and gmapping. Not sure if this prevents gmapping of getting the speed up bags correctly. Is there some way to increase the speed at which gmapping can create a map from a rosbag that is being played faster?

Small side question: What would be the most important parameters probably for a differential drive robot to test for. Right now I test minimumScore, resampleThreshold, particles. Are the other important ones, or a guideline how to tune these parameters?

2022-07-23 11:38:31 -0500 received badge  Self-Learner (source)
2022-07-23 11:38:31 -0500 received badge  Necromancer (source)
2022-05-31 12:43:26 -0500 received badge  Notable Question (source)
2022-05-03 06:42:21 -0500 received badge  Notable Question (source)
2022-04-14 13:42:10 -0500 received badge  Famous Question (source)
2022-03-30 03:22:21 -0500 received badge  Popular Question (source)
2022-03-28 08:59:13 -0500 commented question How can I show the exception which happens in ros2 param list?

While not an answer to my problem I found out that the different middlewares are incompatible. So setting export RMW_IMP

2022-03-28 08:58:18 -0500 commented question How can I show the exception which happens in ros2 param list?

While not an answer to my problem I found out that the different middlewares are incompatible. So setting export RMW_IMP

2022-03-28 07:03:26 -0500 asked a question How can I show the exception which happens in ros2 param list?

How can I show the exception which happens in ros2 param list? I am calling ros2 param list and get back: Exception whil

2022-03-24 12:06:52 -0500 commented question Can see topic when using ros2 topic list, but can't echo it?

Well and here we are. I have yet to try in a network without a firewall, there is a possibility that that is a problem.

2022-03-24 12:06:15 -0500 commented answer Can see topic when using ros2 topic list, but can't echo it?

Well isn't echo such a minimal subscriber? I thought that was the point of it, wouldn't I be just rewriting the code in

2022-03-23 09:21:29 -0500 commented answer Can see topic when using ros2 topic list, but can't echo it?

I tried that at first and it doesn't, then I tried echo. Now I'm not sure which is the more reliable tool to check...

2022-03-23 09:19:42 -0500 commented question Can see topic when using ros2 topic list, but can't echo it?

I checked that the QOS are the same by using ros2 topic echo /cloud --verbose and setting the once which rviz exposes to

2022-03-23 08:27:31 -0500 received badge  Notable Question (source)
2022-03-23 04:05:37 -0500 commented answer Can see topic when using ros2 topic list, but can't echo it?

How did you fix that? Because it's a sensor driver, so I can't change the publisher.

2022-03-23 03:09:57 -0500 edited question Can see topic when using ros2 topic list, but can't echo it?

Can see topic when using ros2 topic list, but can't echo it? I have two computers(Ubuntu 20.04) in the same network with

2022-03-23 03:05:02 -0500 received badge  Popular Question (source)
2022-03-22 10:11:01 -0500 edited question Can see topic when using ros2 topic list, but can't echo it?

Can see topic when using ros2 topic list, but can't echo it? I have two computers(Ubuntu 20.04) in the same network with

2022-03-22 10:10:49 -0500 edited question Can see topic when using ros2 topic list, but can't echo it?

Can see topic when using ros2 topic list, but can't echo it? I have two computers(Ubuntu 20.04) in the same network with

2022-03-22 04:03:29 -0500 asked a question Can see topic when using ros2 topic list, but can't echo it?

Can see topic when using ros2 topic list, but can't echo it? I have two computers(Ubuntu 20.04) in the same network with

2022-03-01 04:00:36 -0500 received badge  Popular Question (source)
2022-02-28 09:01:54 -0500 commented answer How can I check what middleware I am using in ros2?

I added more information on what exactly I would like to know. I checked your links beforehand and they do not offer a s

2022-02-28 09:01:32 -0500 edited question How can I check what middleware I am using in ros2?

How can I check what middleware I am using in ros2? To be more precise: I have a node running, how can I check what midd

2022-02-28 06:56:15 -0500 commented answer Restrict ROS 2 to Localhost

This does not work for me

2022-02-28 06:56:07 -0500 commented answer Restrict ROS 2 to Localhost

This does not work for me

2022-02-28 06:50:25 -0500 edited question How can I check what middleware I am using in ros2?

check what middleware I'm using ros2 The question is in the title.

2022-02-28 06:50:02 -0500 asked a question How can I check what middleware I am using in ros2?

check what middleware I'm using ros2 The question is in the title.

2022-02-28 06:49:34 -0500 asked a question How can I check in ros2 what middleware I am using?

How can I check in ros2 what middleware I am using? The question is in the title.

2022-02-18 06:39:17 -0500 received badge  Famous Question (source)
2022-02-05 07:53:24 -0500 marked best answer How to specify the network interface ros2 uses for communication?

When I launch my node, after installing a docker image, I get following warning, luckily it arbitrarily selects the right interface, but how can I specify it to get rid of the warning? [od-1] 1614701696.982410 [0] od: using network interface eno1 (udp/192.168.254.20) selected arbitrarily from: eno1, docker0, br-ab6309382a59, tun0I'm using Ros2 build from source master and ros2 branches. I found: https://answers.ros.org/question/2999... and I was wondering if this applies in my case? I didn't find much information and before reading the extensive fast dds api to figure out how to set it, I ask here to make sure, this would even be a solution to my problem and if there is a new(set it directly by ros2) way to specify the network instead of going and fiddling with the default implementation.

2022-02-05 07:53:24 -0500 received badge  Necromancer (source)
2022-02-05 07:53:24 -0500 received badge  Self-Learner (source)
2022-01-12 08:42:07 -0500 received badge  Popular Question (source)
2022-01-12 08:42:07 -0500 received badge  Notable Question (source)
2022-01-12 08:42:07 -0500 received badge  Famous Question (source)