mteb/BrightProRoboticsRetrieval huggingface dataset:
turtlebot4 nav2: how to call action navigateToPose from node in cpp

I am migrating a node that send goals to nav2 (originally move_base) thru an action since I need to know if it has been reached or cancelled by the planner.

It will work with the Turtlebot4. I've been reading the nav2 documentation and launching the nav2 launch of Turtlebot4 and I guess that I need to call the action /navigate_to_pose of the node bt_navigator. However showing the interface, I see that the result is a std_msgs/Empty.

How can I easily send goals to Turtlebot4 from a cpp node and know the status of the navigation (i.e. goal reached/cancelled/travelling)?
iRobot Roomba compatible with ROS2 other than the Create?

I plan to buy an iRobot to test ROS2, but the Create 3 not available in my country, import tax and shipping cost may very high, also sometime custom will reject the import. But many other model from iRobot available like 627, I7, J7 ..., So what model compatible with ROS? Or I should by the Create 3.
Ros2 Dictionary srv/msg type

I would like to be able to return a dictionary as a Response in my interface, Is it possible to return a python dictionary or should I write code similar to this:

uint8 action

---

item1Class dict
-- other msg types below ---

where item1Class is a struct

This is probably not possible, essentially I want:

    observation = {
        "lidar": lidar_data,
        "pose": {
            "positionX": X,
            "positionY": Y,
            "orientation": yaw,
        },
    }
as a srv message where lidar is float32[] and all pose variable are floats.

Whats the best practice using Ros2 to achieve this. Or is this not what srv/msg was intended for?
How to send and receive CAN messages on Ubuntu 18.04 using ROS Melodic

I am trying to use a PCAN-USB device (from Peak-System) to be able to send and receive CAN messages which I would like to use to control a robot using ROS at some point for work.From the research I have done, I have found out that there are different drivers and python libraries and different APIs to achieve what I am looking for. The problem is there is no guides or clear instructions on how to get started.

I go to a page and then it tells me to look at something else and this keeps happening. I would like to use the PEAK-System API and drivers, installed both already but I don't know how to make it work with python but and I am not sure if what I have downloaded is even the right thing.

Essentially what I am looking for is some guidance on how to check if the drivers and API is installed correctly and how to get a simple python script going, and then I'll have something to build on.

I have tried to give as much detail as possible and not make the question too broad sorry if it's still not specific enough.

Thanks.
Nav2 - How to create a custom behavior tree (BT) plugin/node in a separate ros2 package?

I'm trying to create a my own custom bt plugin. In the official tutorial https://navigation.ros.org/plugin_tutorials/docs/writing_new_bt_plugin.html, I can't see an instruction or an example on how to create a behavior tree plugin in a separate ros2 package just like in this nav2 repo tutorial https://github.com/ros-planning/navigation2_tutorials/tree/master where the custom plugins (custom costmap, behavior, controller and planner) are created in a separate package.

So I'm wondering, is it possible to create the bt plugin/node in a separate package? or I need to install nav2 from source and try to create the bt plugin on the /navigation2/nav2_behavior_tree/plugins folder?
How to use Gazebo Ignition NavSat plugin

I'm trying to use the Navsat plugin but I can't get it working. I'm using ros-humble

I've been following the link below, but I am unable to see any navsat topic in gazebo https://answers.gazebosim.org//question/28643/gps-sensor-plugin-in-ignition/

In my robot urdf, I have the following code

    <link name="chassis">
            ....
      <plugin filename="ignition-gazebo-navsat-system" name="ignition::gazebo::systems::NavSat"/>
      <gazebo>
        <sensor name="navsat_sensor" type="navsat">
          <always_on>1</always_on>
          <update_rate>1</update_rate>
          <topic>navsat</topic>
        </sensor>
     </gazebo>
    </link>
On my world sdf, I also included

    <world name="field">
        ...
      <spherical_coordinates>
        <surface_model>EARTH_WGS84</surface_model>
        <world_frame_orientation>ENU</world_frame_orientation>
        <latitude_deg>-22.986687</latitude_deg>
        <longitude_deg>-43.202501</longitude_deg>
        <elevation>0</elevation>
        <heading_deg>0</heading_deg>
      </spherical_coordinates>
    </world>
Sensors in ROS2 without driver

I got a new LiDAR from a seller who unfortunately does not provide any ROS2 support. Rather there is only a Point Cloud Visualiser .exe in Windows. I would like to use the LiDAR in my project of developing Autonomous Farming Vehicle but dont know how I can use this in ROS2 without any Package or Driver. Is it possible to use it somehow or develop a ROS2 supported package of the LiDAR??
behaviortree-cpp not installing using apt

I tried to install behaviortree using sudo apt install ros-noetic-behaviortree-cpp* and got the following error while the system installing it:

Preparing to unpack .../ros-noetic-behaviortree-cpp-v3_3.8.5-1focal.20230814.151
459_amd64.deb ...
Unpacking ros-noetic-behaviortree-cpp-v3 (3.8.5-1focal.20230814.151459) ...
dpkg: error processing archive /var/cache/apt/archives/ros-noetic-behaviortree-c
pp-v3_3.8.5-1focal.20230814.151459_amd64.deb (--unpack):
 trying to overwrite '/opt/ros/noetic/bin/bt3_log_cat', which is also in package
 ros-noetic-behaviortree-cpp 4.4.2-1focal.20231128.201059
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/ros-noetic-behaviortree-cpp-v3_3.8.5-1focal.20230814.15
1459_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried multiple ways to install it but was unsuccessful.
How to get started using the C++ API for Gazebo Harmonic?

I'm completely new to gazebo and did some of the well explained tutorials to learn how the basic functionality of gazebo is working. So this is my setup:

I'm using Windows 10 and installed gazebo with WSL2 on a Ubuntu distribution. From here I did some of the tutorials and was able to interact with the simulation with the gui and also via messages from the powershell (using wsl). So from the powershell I'm able to start the simulation and also can send and receive commands to move the robot or read out some sensor data.

My plan is, to use this functionality inside of a C++ or C# application without using the powershell. So I like to use the C++ API given by gazebo.

My idea is, to write some code in Visual Studio on my Windows machine and execute this code via cross compilation on my wsl2 instance, where my actual gazebo instance is running.

My key question is, how to integrate the gazebo library into Visual Studio and to be able to interact with my gazebo instance? For the beginning i would just start a scene "my_world.sdf" and read out some sensor data.

Currently I am struggeling with the integration into Visual Studio 2022.

I would be really grateful for any advice given to this topic.
Using standalone gazebo 11, and no gui will spawn

I am trying to use gazebo through c++ (without calling from command line). I have a main.cpp file something like following

#include <gazebo/gazebo.hh>
#include <gazebo/common/common.hh>
#include <gazebo/physics/physics.hh>

int main(int _argc, char **_argv)
{
  // Initialize gazebo.
  gazebo::setupServer(_argc, _argv);

  // Load a world
  gazebo::physics::WorldPtr world = gazebo::loadWorld("simple_world.world");

  gazebo::physics::ModelPtr robot = world->ModelByName("robot");

  while (true)
  {
    gazebo::runWorld(world, 1);
  }

  // Close everything.
  gazebo::shutdown();
}
However no gui will spawn by running this but the robot will move around if I set velocity to the robot. I can spawn gazebo gui if I use command line tools gazebo simple_world.world.

Does anyone know if I missed anything here? I would really appreciate any help here. Thank you
Gazebo Garden: How to publish the transform of elements in a simulation

I need the depth ground truth of a camera view in gazebo and decided to go with an rgbd camera which produces a pointcloud. In order to visualize this I need to somehow publish the transform of the rgbd camera. How can I publish such a transform in gazebo? I can transfer gazebo topics to ros topics with my setup but I don't know how to publish the transforms from the simulation in the first place. Any ideas?

I am working with a gazebo garden setup where I use a gz-ros2 and ros2-ros1 bridge in order to work with ros as well (I know this is not a good setup and the endeavor is to only use ros2 at some point.)
How can i show on my browser what i see on Rviz?

Im on ROS2-Humble and i want to see my robot's location and movement on the map, the way i see it on Rviz, on my browser. For example, I want from Rviz to get the Grid, RobotModel, TF, and Map, send it on my browser and show it there, kinda like streaming it or rendering it via a .js file and .html. Im new with ROS2 and i cant seem to find any sources to help me. Most of the things i find are for ROS1 and Chat GPT doesnt help at all. Basically something like this: https://answers.ros.org/question/319626/real-time-map-generate-on-web-like-a-rviz/

Any tips/help would be greatly appreciated, thanks in advance!
Simple takeoff then do yaw rotation

Arming and takeoff work fine but i don't know how to do yaw rotation:

class controller:
    def __init__(self):
        
        rospy.Subscriber('mavros/state', State, self.state_cb)
        
        self.state = State()


    def state_cb(self, msg):
        self.state = msg
    
    def move(self,x,y,z):
        pub_posisi = rospy.Publisher("/mavros/setpoint_velocity/cmd_vel",TwistStamped,queue_size=1)
        pub_data = TwistStamped()

        pub_data.twist.linear.x = x
        pub_data.twist.linear.y = y
        pub_data.twist.linear.z = z

        pub_posisi.publish(pub_data)

        time.sleep(5)
    
    def position(self,x,y,z):
        pub_posisi = rospy.Publisher("/mavros/setpoint_position/local",PoseStamped,queue_size=10)
        posisi = PoseStamped()
        
        posisi.pose.position.x = x
        posisi.pose.position.y = y
        posisi.pose.position.z = z

        q = quaternion_from_euler(0.0,0.0,3.0)
        
        posisi.pose.orientation.x = q[0]
        posisi.pose.orientation.y = q[1]
        posisi.pose.orientation.z = q[2]
        posisi.pose.orientation.w = q[3] 

        pub_posisi.publish(posisi)

        rospy.loginfo(f"go to point {x,y,z}")

        time.sleep(15)
irobot create3 topics not found after setup in macos multipass vm

I have a Mac OS 14.1 and I'm seting up irobot Create3 for the first time. I've confirmed the robot works using the python web playground.

I've installed Multipass 1.12.2+mac and created an Ubuntu 22.04 instance and installed ROS2 per the robot humble setup guide. I created the multipass instance with this command:

multipass launch --name=create3 --cpus=2 --disk=20GiB
When listing the topics, I don't see any of the expected irobot topics

ros2 topic list
Actual:

/parameter_events 
/rosout
Expected:

/battery_state
/cliff_intensity
/cmd_audio ...
The VM info multipass info create3:

Name:           create3
State:          Running
IPv4:           10.211.67.3
                172.17.0.1
Release:        Ubuntu 22.04.3 LTS
Image hash:     054db2d88c45 (Ubuntu 22.04 LTS)
CPU(s):         2
Load:           0.00 0.14 0.12
Disk usage:     8.8GiB out of 19.3GiB
Memory usage:   248.8MiB out of 3.8GiB
Mounts:         --
Error fetching dependencies from Git repo

I have cloned this repo:https://github.com/ClemensElflein/open_mower_ros

however when fetching the dependencies with:

rosdep install --from-paths src --ignore-src --default-yes
I get the following error:

ERROR: the following packages/stacks could not have their rosdep keys resolved  to system dependencies: 
mower_utils: Cannot locate rosdep definition for [xbot_msgs] 
mower_msgs: Cannot locate rosdep definition for [xesc_msgs] 
mower_simulation: Cannot locate rosdep definition for [xbot_positioning]
mower_comms: Cannot locate rosdep definition for [xesc_msgs] 
mower_map: Cannot locate rosdep definition for [xbot_msgs] 
open_mower: Cannot locate rosdep definition for [ftc_local_planner] 
mower_logic: Cannot locate rosdep definition for [xbot_positioning]
I have tried many things, but nothing works. I am working on ros-noetic. Any tip?
What is the difference between RCL_STEADY_TIME, RCL_SYSTEM_TIME and RCL_ROS_TIME?

I wrote the following code to check the difference myself, but I could not find any considerable difference.

#include <rclcpp/rclcpp.hpp>

auto main(int argc, char **argv) -> int 
{
        rclcpp::init(argc, argv);

        auto node = std::make_shared<rclcpp::Node>("time_converter");

        rclcpp::Time steady_time(node->now(),RCL_STEADY_TIME);
        RCLCPP_INFO(node->get_logger(), "RCL_STEADY_TIME = %f",steady_time.seconds());  

        rclcpp::Time sys_time(node->now(),RCL_SYSTEM_TIME);
        RCLCPP_INFO(node->get_logger(), "RCL_SYSTEM_TIME = %f",sys_time.seconds());  

        rclcpp::Time ros_time(node->now(),RCL_ROS_TIME);
        RCLCPP_INFO(node->get_logger(), "RCL_ROS_TIME = %f",ros_time.seconds());  

        return EXIT_SUCCESS;
}
Output:

[INFO] [1699543136.456027415] [time_converter]: steady node time = 1699543136.456026
[INFO] [1699543136.456121797] [time_converter]: sys node time = 1699543136.456121
[INFO] [1699543136.456138399] [time_converter]: sys node time = 1699543136.456138
Actual question is, How do I get steady time from node->now()? Because that is the answer I am looking for.
Parameter substitution within rosparam list inside launch file

I am trying to change the parameter map_frame within the rosparam list as shown below, but the substitution does not work.

I am actually passing the "tf_pre" argument from another launch file.

This line <rosparam param="map_frame" subst_value="True">$(arg tf_pre)/map </rosparam> # prefix the tf name for the map is used to pass the value of tf_pre to the value of map_frame inside the <rosparam> list.

This does not seem to have any effect because when I run rosparam get /h1/slam_gmapping/map_frame I get the wrong value.

Anyone has an idea what could be wrong?

This runs in ROS Noetic and I am trying to slam a multi robot Gazebo simulation.

 <launch>
    
      <arg name="tf_pre" default="robot1" />
    
      <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping">
    
        <rosparam param="map_frame" subst_value="True">$(arg tf_pre)/map </rosparam> # prefix the tf name for the map
    
        <rosparam>
          odom_frame: odom
          base_frame: base_link
          map_frame: map
          ...
    
        </rosparam>
    
      </node>
    </launch>
Crazyflie: Connecting, logging and parameters-->Add logging config

I would like to define stateEstimate.vx, stateEstimate.vy, and stateEstimate.vz variables to access those data. I used the following code parts.

def _connected(self, link_uri):

        self.get_logger().info('Connected!')
        self._lg_stab = LogConfig(name='Stabilizer', period_in_ms=100)
        self._lg_stab.add_variable('stateEstimate.x', 'float')
        self._lg_stab.add_variable('stateEstimate.y', 'float')
        self._lg_stab.add_variable('stateEstimate.z', 'float')
        self._lg_stab.add_variable('stateEstimate.vx', 'float')
        self._lg_stab.add_variable('stateEstimate.vy', 'float')
        self._lg_stab.add_variable('stateEstimate.vz', 'float')        
        self._lg_stab.add_variable('stateEstimate.roll', 'float')
        self._lg_stab.add_variable('stateEstimate.pitch', 'float')
        self._lg_stab.add_variable('stateEstimate.yaw', 'float')
               
        self._lg_range = LogConfig(name='Range', period_in_ms=100)
        self._lg_range.add_variable('range.zrange', 'uint16_t')
        self._lg_range.add_variable('range.front', 'uint16_t')
        self._lg_range.add_variable('range.right', 'uint16_t')
        self._lg_range.add_variable('range.left', 'uint16_t')
        self._lg_range.add_variable('range.back', 'uint16_t')
        try:
            self._cf.log.add_config(self._lg_stab)
            self._lg_stab.data_received_cb.add_callback(self._stab_log_data)
            self._lg_stab.error_cb.add_callback(self._stab_log_error)
            self._lg_stab.start()
            self._cf.log.add_config(self._lg_range)
            self._lg_range.data_received_cb.add_callback(self._range_log_data)
            self._lg_range.error_cb.add_callback(self._range_log_error)
            self._lg_range.start()

        except KeyError as e:
            print('Could not start log configuration,'
                  '{} not found in TOC'.format(str(e)))
        except AttributeError:
            print('Could not add Stabilizer log config, bad configuration.')
When I run my python file via ROS2, I saw the following part on the terminal (Could not add Stabilizer log config, bad configuration). I could not get why it happens. However, whenver I use the above code part without stateEstimate.vx, stateEstimate.vy, and stateEstimate.vz, it works pretty well. Could you help us to fix it, thanks.

ntukenmez3@ae-icps-407120:~/Documents/2023-crazy-flie-1/crazyflie_ros2_experimental_2/crazyflie_ros2$ ros2 run crazyflie_ros2 crazyflie_publisher 
[INFO] [1698871075.735318053] [crazyflie_publisher]: Connected!
Could not add Stabilizer log config, bad configuration.
Convert ROS2 SQLite bag to MCAP format
Asked 5 months ago
Modified 5 months ago
Viewed 803 times
2

I've got some ROS2 bags in SQLite format that I'd like to convert to MCAP format, but I cannot find any examples or tools that do it. I'd have hoped there would be an obvious option for ros2 bag convert, like the --output-options YAML's storage_id:, but it's not obvious to me what to use.
About Lifecycle, And how to call `on_deactivate()` in `hardware_interface` of ros2_control by controller_manager CLI or other method?

I have implemented a hardware interface in ros2_control and added code to free my hardware resources in the on_deactivate() method.

When I try to stop the controller with the command ros2 control set_controller_state diffbot_base_controller inactive and try to free the hardware, on_deactivate() doesn't seem to be called.

I can't find console output from deactivate, and the read/write method is still being called. Unlike before, only the value from hw_command_ is 0.

It's very confusing.Maybe I'm confused about the life cycle concept in controller_manager of ros2_control. I was hoping to get some tips or links to relevant materials.
How do I send a new position to my 5 dof robot arm?

I am a newbie with ros2 control. I am using ros2 iron on Ubunto 22.04 (Linux Mint). I made a copy of the ros2_control demo example #7.

This is the one that is launched with the command ros2 launch ros2_control_demo_example_7  r6bot_controller.launch.py, I changed the name as well as urdf file. I also interfaced it with my Arduino robot arm based on positions. My arm has 5 instead of 6 joints and only uses positions. There are no encoders on my arm. All the velocity commands and states related to velocity were taken out of example 7. In my hardware interface (copy), I have code that when a position is changed, the code should send off a state change to an Arduino robot arm...

When I run ros2 control list_controllers, I see

jem_5dof_robot_arm_controller[jem_robot_arm/RobotController] active    
joint_state_broadcaster[joint_state_broadcaster/JointStateBroadcaster] active
When I run ros2 control list_hardware_interfaces, I see

command interfaces
    Joint1/position [available] [claimed]
    Joint2/position [available] [claimed]
    Joint3/position [available] [claimed]
    Joint4/position [available] [claimed]
    Joint5/position [available] [claimed]
state interfaces
    Joint1/position
    Joint2/position
    Joint3/position
    Joint4/position
    Joint5/position
I also see am image of my robot arm in rviz... I would say "things look like they are working"

My question is this...........

How do I send a new position to my robot arm from the command line or a GUI. Either send one new position for a Joint or send the set of positions for all 5 joints. All I want to happen is, quickly send something and interact with the Arduino hardware. I believe the code I implemented in the hardware interface to my Arduino based arm will work, the question is how to I force something to call my hardware interface with an update (so as to test). I'd like to set a few different positions and see if the hardware is working ok. Ideally, it would be nice to make changes in rviz and send those changes to my arm/Arduino. I suspect that rviz is only a one way visualization of the arm and has no way to move something. I suspect that once a new position is sent to my robot arm's controller [jem_5dof_robot_arm_controller], rviz will update accordingly.

What are is a simple way to send off a few new positions from the command line to test?
rclcpp wait for a list of service/action servers to start before proceeding further

I have a list of services and a list of actions that I need to wait for to start before I can proceed further. Is there some sort of inbuilt function in rclcpp or rclcpp::Node that I can use?

Creating a custom service and action client type is not really a viable option for me, since I would have more than 100 services + actions combined.

What I want is something like the following:

class SomeNode : public rclcpp::Node
{
public:
    SomeNode() : Node("service_and_action_check")
    {
        /* We do our initial setup */

        std::vector<std::string> serviceList = {"service1", "service2", "service3"};
        std::vector<std::string> actionList  = {"action1", "action2", "action3"};

        for (auto &elem : serviceList)
        {
            checkIfServiceServerIsRunning(elem);
        }

        for (auto &elem : actionList)
        {
            checkIfActionServerIsRunning(elem);
        }

        RCLCPP_INFO(this->get_logger(), "All services and actions have been loaded.");
    }
    .
    .
    .
};
 
If this is not readily available, if anyone knows of a simple way to create the functions checkIfServiceServerIsRunning and checkIfActionServerIsRunning, that would be of help too.

Thanks!
Why TEB controller is not available in ros2 humble?

On navigation plugin setup document , the TEB controller is mentioned, but I don't find any documentation to set up this controller in nav2 humble. And there is no humble branch in the teb_local_planner repository. So I copied the TEB parameters from foxy and launch the navigation node, but it told me the TEB controller plugin can't be found.

[controller_server-4] [FATAL] [1697706023.360686729] [controller_server]: Failed to create controller. Exception: According to the loaded plugin descriptions the class teb_local_planner::TebLocalPlannerROS with base class type nav2_core::Controller does not exist. Declared types are  dwb_core::DWBLocalPlanner nav2_mppi_controller::MPPIController nav2_regulated_pure_pursuit_controller::RegulatedPurePursuitController nav2_rotation_shim_controller::RotationShimController
So why TEB controller is not available in ros2 humble? or did I miss something? Thanks.
How to use stereo_image_proc without camera_info topics?

I'm working with 2 csi cameras in a jetson nano with ROS2 humble and I want to do a disparity image. What I'm trying to use is stereo_image_proc disparity node, but it requires to have the camera_info topics for both of the cameras. The camera is a imx219-83 and I haven't found a driver that allows me to have a camera_info topic. Is it possible to obtain this topic ? If not, is there something that could be helpful for this situations?

Thanks!