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

Webadone's profile - activity

2022-08-18 09:23:58 -0500 commented question ros2_control hardware interface handle defines value as double * - why?

Just curious if there is anyone with the same thoughts or question? :)

2022-04-28 07:45:11 -0500 received badge  Student (source)
2021-11-29 03:48:47 -0500 received badge  Famous Question (source)
2021-11-17 12:42:50 -0500 received badge  Famous Question (source)
2021-10-12 23:44:20 -0500 received badge  Notable Question (source)
2021-09-09 02:09:25 -0500 received badge  Popular Question (source)
2021-08-13 00:50:08 -0500 received badge  Enthusiast
2021-08-12 07:44:03 -0500 commented question how to make service "not ready" while it is processing a request?

Yes - wait_for_service only waits until the service 'exists'. So if I got it right you are afraid that there is a simul

2021-08-12 07:30:55 -0500 answered a question how to create noisy odom topic in ros C++

Hi, my first idea would be to look at other plugins that are incorporate noise in their sources so like gps simulation

2021-08-12 07:30:55 -0500 received badge  Rapid Responder (source)
2021-08-12 07:22:25 -0500 asked a question ros2_control hardware interface handle defines value as double * - why?

ros2_control hardware interface handle defines value as double * - why? Hi! So the hardware interface Handle (https://g

2021-08-04 15:03:31 -0500 received badge  Notable Question (source)
2021-08-04 15:03:31 -0500 received badge  Popular Question (source)
2021-06-20 06:15:16 -0500 received badge  Enlightened (source)
2021-06-20 06:15:11 -0500 received badge  Good Answer (source)
2021-06-19 22:51:29 -0500 received badge  Nice Answer (source)
2021-06-18 05:58:30 -0500 commented answer How to create topics and synchronize them when recording a bagfile.

Ah perfect, good to hear!

2021-06-18 04:20:12 -0500 answered a question How to create topics and synchronize them when recording a bagfile.

Hey! I did a quick search and found that topic which might be of interest for you: https://answers.ros.org/question/318

2021-06-18 04:20:12 -0500 received badge  Rapid Responder (source)
2021-06-17 09:46:22 -0500 received badge  Teacher (source)
2021-06-17 03:41:39 -0500 answered a question sensor_msgs/Image

I'm not an expert to that so maybe I'm wrong. When looking at the documentation http://docs.ros.org/en/api/sensor_msgs/

2021-06-17 03:41:39 -0500 received badge  Rapid Responder (source)
2021-06-17 03:24:15 -0500 answered a question error when i run catkin_make

This error message CMake Error at navigation_tutorials/robot_setup_tf_tutorial/CMakeLists.txt:11 (add_executable): ad

2021-06-17 03:24:15 -0500 received badge  Rapid Responder (source)
2021-06-17 03:16:18 -0500 commented question error when i run catkin_make

Can you please paste the complete content of the console? - like in that post? https://answers.ros.org/question/237422/

2021-06-16 07:01:04 -0500 marked best answer Using diagnostic_updater in a ros2_control resource (actuator etc)

Hi!

In ROS 1 I use an diagnostic_updater::Updater to publish hardware infos like status/error words, current device mode etc. The usage is pretty straight forward like creating the diagnostic Updater in my RobotHW instance and registering a updateDiagnostics(diagnostic_updater::DiagnosticStatusWrapper& stat) method for each hw component to it.

Doing this in ros2_control resource like an Actuator etc. seems to be not that easy. The Updater ctor now needs a NodeT https://github.com/ros/diagnostics/bl... which makes sense since it needs to create the publisher.

My actuator is define like class RobotMotorActuator : public BaseInterface<ActuatorInterface> - so no access to a NodeT. I was thinking if I can get somehow the NodeT of the ControllerManager which I guess is actually the node loading my driver with the ResourceManager but I did not find a way to retrive it (for a reason? :) )

Maybe there is now a different best pratice. As an alternative I'm thining about a bunch of own StateInterface definitions and perform the Diagnostics in the controller.

Long story short - what is the intended way of bringing hardware diagnostic informations to the diagnostics 'subsystem' in ros2_control?

Thanks a lot!

2021-06-16 07:01:03 -0500 commented answer Using diagnostic_updater in a ros2_control resource (actuator etc)

Thanks for your quick reply! Yes understood, that makes of course sense to me.

2021-06-16 05:25:58 -0500 commented question Missing tf message in Rviz while it actually exists

Can you post the full error message? Does it say its not there or is it something with extrapolation into the future?

2021-06-16 05:17:45 -0500 commented question error when i run catkin_make

Can you please paste the complete content of the console? - like in that post?https://answers.ros.org/question/237422/in

2021-06-16 04:53:34 -0500 asked a question Using diagnostic_updater in a ros2_control resource (actuator etc)

Using diagnostic_updater in a ros2_control resource (actuator etc) Hi! In ROS 1 I use an diagnostic_updater::Updater to

2021-06-09 02:42:25 -0500 received badge  Famous Question (source)
2021-05-10 01:02:22 -0500 received badge  Supporter (source)
2021-05-10 01:02:20 -0500 marked best answer ros2_control - Created node by ControllerInterface gets nodename of controller_manager no matter what (diff_drive_controller)

Hi!

I started to work with ros2_control and want to set it up with a diff_drive_controller. Therefore I wrote an Actuator that implements the handling of my motors. The issue I now have is that when loading the controller, the new created Node is getting the name of controller_manager, not the passed controller_name. Therefore I have a) two nodes with the same name and b) the defined parameters for the diffdrive_controller can not be loaded because the a node with that name is does not exist (caused by a) :) )

To find the cause of that issue I step by step cloned the ros2_controllers and then the ros2_control github repos into my workspace to be able to at least add some debugmessages.

So my setup is now the following:

  • ros:foxy docker image with updated packages (apt update && apt upgrade)
  • /ros2_ws/src contains { ros2_controllers, ros2_control, myrobot_control, myrobot_description }

whereas the launchfile from myrobot_control looks like that

#!/usr/bin/env python3

import os

import xacro
import launch
from launch_ros.actions import Node

from launch import LaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource

from launch.conditions import IfCondition, UnlessCondition
from launch.actions import DeclareLaunchArgument, GroupAction, ExecuteProcess, IncludeLaunchDescription
from launch.substitutions import LaunchConfiguration, PythonExpression

from ament_index_python.packages import get_package_share_directory, get_package_prefix


def get_parsed_urdf_string():
    shared_dir = get_package_share_directory('myrobot_description')
    path = os.path.join(shared_dir, 'urdf', 'myrobot.xacro')
    return xacro.process(path)

def generate_launch_description():
    urdf_description_string = get_parsed_urdf_string()
    robot_description = { 'robot_description': urdf_description_string }

    myrobot_controller_config = os.path.join(
        get_package_share_directory("myrobot_control"),
        "config",
        "controller.yaml",
    )

    return LaunchDescription([
        Node(
            package="robot_state_publisher",
            executable="robot_state_publisher",
            name="robot_state_publisher",
            output="screen",
            parameters=[robot_description],
        ),
        Node(
            package="controller_manager",
            executable="ros2_control_node",
            name="controller_manager",
            parameters=[ {"update_rate": 1 },
                         robot_description,
                         myrobot_controller_config ],
            output={
                "stdout": "screen",
                "stderr": "screen",
            },
        ),
    ])

and the controller.yaml

controller_manager:
  ros__parameters:
    update_rate: 1 # Hz

    diffdrive_controller:
      type: diff_drive_controller/DiffDriveController

diffdrive_controller:
    left_wheel_names: [ 'front_left_wheel_joint', 'rear_left_wheel_joint' ]
    right_wheel_names: [ 'front_right_wheel_joint', 'rear_right_wheel_joint' ]

    wheel_separation: 0.51
    wheels_per_side: 2
    wheel_radius: 0.141

    wheel_separation_multiplier: 1.0
    left_wheel_radius_multiplier: 1.0
    right_wheel_radius_multiplier: 1.0

    publish_rate: 50.0
    enable_odom_tf: False

Moreover, like initially said, I added some debug outputs to ros2_controls controller_interface.cpp

return_type
ControllerInterface::init(const std::string & controller_name)
{
    RCLCPP_INFO(rclcpp::get_logger("ControllerInterface"), "!!!!!!!!!! controller_name: %s", controller_name.c_str());

    node_ = std::make_shared<rclcpp::Node>(
        controller_name,
        rclcpp::NodeOptions().allow_undeclared_parameters(true));
    lifecycle_state_ = rclcpp_lifecycle::State(
        lifecycle_msgs::msg::State::PRIMARY_STATE_UNCONFIGURED, "unconfigured");

    std::shared_ptr<rclcpp::Node> node2 = std::make_shared<rclcpp::Node>("test", rclcpp::NodeOptions().allow_undeclared_parameters(true));
    std::shared_ptr<rclcpp::Node> node3 = std::make_shared<rclcpp::Node>("test", "controller_manager", rclcpp::NodeOptions().allow_undeclared_parameters(true));

    std::shared_ptr<rclcpp::Node> node4 = std::make_shared<rclcpp::Node>("test");
    std::shared_ptr<rclcpp::Node> node5 = std::make_shared<rclcpp::Node>("test", "controller_manager");

    RCLCPP_INFO(rclcpp::get_logger("ControllerInterface"), "controller_name: %s, nodename: %s, fqn: %s", controller_name.c_str(), node_->get_name(), node_->get_fully_qualified_name());
    RCLCPP_INFO(rclcpp::get_logger("ControllerInterface"), "controller_name: %s, nodename: %s, fqn: %s", controller_name.c_str(), node2->get_name(), node2->get_fully_qualified_name());
    RCLCPP_INFO(rclcpp::get_logger("ControllerInterface"), "controller_name: %s, nodename: %s, fqn: %s", controller_name.c_str(), node3->get_name(), node3->get_fully_qualified_name());
    RCLCPP_INFO(rclcpp::get_logger("ControllerInterface"), "controller_name: %s, nodename: %s, fqn: %s", controller_name.c_str(), node4->get_name(), node4->get_fully_qualified_name());

    return return_type::OK;
}

Based on that infos I start the launchfile like

ros2 launch myrobot_control myrobot_control_launch.py

and try to load the diffdrive_controller in another terminal with

ros2 control load_controller diffdrive_controller

The output i get now is

[ros2_control_node-2] [INFO] [1620293060.380857877] [controller_manager]: update rate is 1 ...
(more)
2021-05-07 16:13:24 -0500 received badge  Notable Question (source)
2021-05-07 02:41:31 -0500 commented question ros2_control - Created node by ControllerInterface gets nodename of controller_manager no matter what (diff_drive_controller)

Ohh indeed that is solving the issue! Thanks a lot! But is that by design or is that a bug? At least it would make sense

2021-05-06 20:19:17 -0500 received badge  Popular Question (source)
2021-05-06 06:47:10 -0500 received badge  Organizer (source)
2021-05-06 05:59:24 -0500 commented question Are there examples of robots using diff_drive_controller in ros2_control?

Hey, I also started with ros2_control stuff. I'm atm trying to get it running but I encounter a wired bug. Just posted t

2021-05-06 05:58:12 -0500 commented question Are there examples of robots using diff_drive_controller in ros2_control?

Hey, I also started with ros2_control stuff. I'm atm trying to get it running but I encounter a wired bug. Just posted t

2021-05-06 05:09:20 -0500 asked a question ros2_control - Created node by ControllerInterface gets nodename of controller_manager no matter what (diff_drive_controller)

ros2_control - Created node by ControllerInterface gets nodename of controller_manager no matter what (diff_drive_contro

2021-04-25 11:29:37 -0500 received badge  Notable Question (source)
2021-03-19 07:01:48 -0500 marked best answer Why is tf_broadcast_publisher creating future tfs

Hi!

I've a question about publishing tfs that are valid in the future. https://github.com/ros/geometry/blob/...

I found this also in robot_state_publisher with use_static_tf false. https://github.com/ros/robot_state_pu...

I configured move_base to control not directly on base link but on a point a bit shifted to the center which shows a good result in 'smoothing' the movements a bit.

Before trying with tf_broadcast_publisher I published the tf from base_link to control_link myself but thought it might make sense to remove that and just use the tf_broadcast_publisher I'm running it with

  <node pkg="tf" type="static_transform_publisher" name="control_link_broadcaster" args="-0.3 0 0 0 0 0 base_link control_link 100"/>

The tf looks then like that (its from the simulation with gazebo not live on the robot)

tf

With a tf from base_link to control_link in the future. When running the navigation now trying to transform the path it throws errors with the "Lookup would require extrapolation into the future" message.

I mean I'm fine publishing that tf myself without that + sleeper thing but I'm interested in the rational behind that.

2021-03-19 07:01:48 -0500 received badge  Scholar (source)