Questions tagged [python]
Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.
977
questions
0
votes
0
answers
7
views
How to use custom message arrays in a service response with Python?
I'm trying to populate a service response array in a Python coded service node and I'm getting an assertion violations from one of the IDL generated files.
The service Service.srv definition is the ...
0
votes
0
answers
5
views
rviz2 crash with error Could not find a root element for package manifest at ...\package.xml
I am using ros2 Jazzy on Windows 10
when trying to start rviz2 it generates this error
...
-1
votes
1
answer
17
views
How we can get mobile robot velocity in the map frame?
velocity of the robot in the odom frame can be seen using 'rostopic echo /odom' but I want to know the velocity of the robot in the map frame of reference. Is there any ROS tool that can help me to ...
0
votes
1
answer
28
views
ROS2 Jazzy (Python) - How to filter a 360º Pointcloud based on a RGB camera's FOV?
First of all, I am pretty new to the robotics scene, so please forgive me if I end up saying something wrong.
I am running a simulation on Gazebo+ROS2 Jazzy (Ubuntu Noble + Python 3.11) that contains ...
0
votes
0
answers
16
views
rosrun can't find supporting python modules
I am using ros1 noetic on Winodws 10
I wrote my nodes in python.
but these nodes depends on -import functions from or use classed from or use date from - other python scripts , dlls, csv ..etc. files....
0
votes
0
answers
10
views
EasyInstallDeprecationWarning: easy_install command is deprecated. With ROS2 Jazzy on Ubuntu 24.04 Noble Numbat
I know this issue is already documented and solved/bypassed with humble, but no solution to Jazzy with Ubuntu 24.04 is proposed at the moment.
Building a brand-new python packages causes the following ...
0
votes
0
answers
21
views
How to efficiently mirror Topics with different QoS Policies?
I’m trying to access ROS2 data from Carnegie Robotics’ S27 Camera (product, docs). The S27 publishes Messages with Best Effort Reliability and ...
0
votes
1
answer
15
views
Change in .launch.py file is not applied when I've changed .launch.py file in ros2 foxy environment
[Situation]
As mentioned at the title, I have changed some code in microstrain_inertial/microstrain_inertial_examples/launch/cv7_launch.py
provided by microstrain github page.
But when I launched the ...
0
votes
0
answers
10
views
ROS2 multithreading for sequential movement of robot arm
I currently have a ros node :
...
0
votes
1
answer
10
views
ROS2 Jazzy, How to change publisher nodes from a package
I have just followed the steps in https://docs.ros.org/en/jazzy/Tutorials/Beginner-Client-Libraries/Writing-A-Simple-Py-Publisher-And-Subscriber.html, and I would like to change the .py script so that ...
0
votes
1
answer
33
views
Changing a relative coordinate system
I've been working on recreating Boston Dynamics' Spot for the past few months. After addressing the kinematics, I've encountered a significant issue. The way I've set up the leg positions has severely ...
0
votes
1
answer
34
views
Best practice for new module
I have a question on how to organise my project, currently, everything is in Python.
The workspace is composed of several packages, with a main one from which the launch file is called. Then, this ...
0
votes
0
answers
13
views
ROS2 URDF/gazebo reverse the parent/child joint relationship
I work with ros2 on a robot crawler arm where the start or end may become fixed or the end effector at any point (inspire from this robot : https://news.mit.edu/2019/robots-large-structures-little-...
0
votes
0
answers
13
views
How to grab an object from the ground placed in front of NAO?
I want to make NAO grab a ball placed in front of him at (0,0)-(y,z) refrence and placed on the ground, I want the robot to grab it with the right hand (the ball being fit to its hand), for that I ...
0
votes
0
answers
4
views
Unable to get turtle2/pose data using subscriber callback ROS2 Turtlesim
I am using Turtlesim in ROS2. But I am unable to get pose data of turtle2 using pt_pose_callback function which is subscribed to /turtle2/pose . I have checked on Terminal and I am able to get data on ...
0
votes
0
answers
9
views
Using a msg file as a dictionary in python
I have this python script that analyzes rosbags. It works well for the most part.
However, there are certain messages in the rosbags that rely on a key-value pair defined in a message file. The file ...
0
votes
0
answers
7
views
No stdout output from logging after SIGINT
I have a ROS2 Python setup:
Top launch file start_robot_launch that includes launch files for all the other submodules and nodes
Several nodes handling different ...
0
votes
0
answers
21
views
Move arms into a direction using angles not working properly
I am using motionProxy.angleInterpolation(chain_id, angle_list, timeLists, True,_async=True) from http://doc.aldebaran.com/2-8/naoqi/motion/control-joint.html#...
0
votes
1
answer
18
views
Python package is imported from src/ instead of install/ directory when using `colcon test`
I have a Python package "foo" that is build with colcon (build type "ament_python"). The package structure is like this:
...
0
votes
0
answers
18
views
launching default Gazebo stuck in ros2 humble
I try to run default installation of gazebo ros2 launch gazebo_ros gazebo.launch.py terminal has following output
...
0
votes
0
answers
8
views
Passing arguments while building ROS 2 python pkg using colcon build
Is there anything that can help with the customized building of the Python pkg in ROS 2?
I found it is possible to pass arguments with pkg type ament_cmake. But I couldn't find any documents for ...
0
votes
1
answer
14
views
Using ros2 launch to run Python nodes on Windows
I'm running into a problem when I try to use ros2 launch (under Jazzy on Windows 10) to run Python nodes.
The Windows shell doesn't understand shebangs, so it isn't able to determine that it should ...
0
votes
1
answer
31
views
How to publish data to a topic different than the one listened to
I want to execute a ROS2 command say:
ros2 topic pub --smth /obj std_msgs/String "sometext"
from a package node (written in Python) that is execute using ...
0
votes
0
answers
8
views
How to get the result of a goal execution on a different machine?
I am using this tool which exposes a server to speech to text service:
https://github.com/MERLIN2-ARCH/speech_to_text
The command to send a goal is:
...
0
votes
0
answers
10
views
Error when running voskros on Windows
So following the below link I have downloaded and build the voskros tool under Ros2 in Windows 10 (Python 3.8):
https://github.com/bob-ros2/voskros
But when I run the execute command:
...
0
votes
0
answers
20
views
Memory Increase Investigation in a Large ROS2 Planner Node with Mixed Python and C++ Code
I have developed a substantial ROS2 Planner node containing various navigation algorithms, with some components written in Python and others in C++. Pybind11 is used to call C++ algorithms from the ...
0
votes
0
answers
14
views
How to import hector slam data on python code
We have a robot controlled by arduino that we planing to get mapping data from raspberry pi connected to lidar. I researched a lot about reading data from hector slam by using Python. I only find one ...
0
votes
1
answer
27
views
A crash issue. The process dies for only rviz 2 when it gets started with ignition gazebo fortress and parameter bridge from a python launch file
It seems that this crash issue has nothing to do with whether the launch variables (rviz 2, ignition gazebo fortress & parameter bridge) are provided as executable processes or nodes. The crash ...
0
votes
1
answer
18
views
Rclpy won't initialise my MultithreadedExecutor
I'm just trying to get the nodes to initialize that's all.
Even running almost empty code with just the executor gives me back:
AttributeError: 'NoneType' object has no attribute 'add_node'
[ros2run]:...
0
votes
0
answers
14
views
I'm having trouble writing ROS2 Launch files in Python
I'm having troubles writing Launch files in Python.
I find python Launch files very complicated. The problem is that I don't really understand all of these modules. I can't find good documentations ...
1
vote
1
answer
48
views
Making an existing Python program work as a ROS 2 node: Is there an easier way?
I have a web backend written in Python—call it backend—that I would like to function as a ROS 2 node. That backend has its own dependencies on Python versions and ...
0
votes
1
answer
26
views
message_to_yaml does not convert string/list variable
I have a python script that I can use to de-serialize a rosbag. I can specify the topic I want to extract, and the script will take care of going through the database and de-serialization the ...
0
votes
0
answers
32
views
ROS2 Windows 10 Could not import 'rosidl_typesupport_c' for custom msg/srv
I was following this tutorial about implementing custom msg/srv files but I'm getting an error whenever I build my "talker" package.
...
0
votes
1
answer
50
views
ros2 launch.py fails to build moveit configuration package
I have been trying loads of different things to try and get my custom urdf/srdf to launch that I created with the moveit2_setup_assistant on ROS 2 Humble (Ubuntu 22.04). I have been somewhat ...
0
votes
1
answer
27
views
How to share data between two different processes in Linux?
On my Ubuntu 22.04 I have the following situation:
ROS2 is installed system-wide and not in an environment
PyTorch is installed in its virtual environment
My concept look likes the following schema:
...
1
vote
1
answer
17
views
Different simulation speeds between Python controller and C++ controller in Webots
I am working on a project in which i want to use Reinforcement Learning to fly the Crazyflie drone. To do this, i need the webots simulation to run as fast as possible.
I managed to create a python ...
0
votes
0
answers
15
views
How to assign array values in rosmsg result part of message in actionlib in Rospy (ROS 1 in python)
Good day all,
I'm trying to create an action server that sends three float64 vectors each containing the x, y and z coordinates of a point following this tutorial: https://www.youtube.com/watch?v=...
0
votes
1
answer
32
views
ROS 2 subscriber that controls RGB LEDs on a Raspberry Pi using rpi-ws281x-python
I am currently working on a robotics project where I want to control RGB LEDs (WS2811 driver) to display the current state of the robot. As the rpi-ws281x-python library needs to be run with sudo, I ...
0
votes
0
answers
20
views
How to install "iou3d_nms_cuda.cpython-37m-x86_64-linux-gnu.so" as a ROS2 module?
I have successfully trained and tested a pointpillars network on my own point cloud dataset using https://github.com/shangjie-li/pointpillars/tree/master. I modified ...
0
votes
0
answers
26
views
How to apply pointpillars on ROS2?
I am using pointpillars for 3D object detection on point cloud data (https://github.com/shangjie-li/pointpillars/tree/master). I have successfully trained and tested the model. I would like to apply ...
0
votes
1
answer
35
views
Create self-contained standalone ROS1 application for Windows
I created a ROS Noetic package that grabs data from some cameras and performs pose estimation of objects in the field of view (using OpenCV). Simultaneously, IMU data is measured and fused with these ...
0
votes
0
answers
13
views
How to add a topic to rosbag without changing its topic Hz using Python?
I have a rosbag with 4 topics. I want to create a new rosbag with 2 additional topics with same Hz as extisting. I tried to read all topics in a loop using python and added 2 more topics.
Problem is, ...
2
votes
0
answers
98
views
Using ament_python_install_package
I am trying to start a C++ ROS node from python code. The python code uses the last message of several topics every 50ms. There are about 10k messages per second being sent and rclpy could not handle ...
0
votes
0
answers
31
views
Using rosbag2_py to write static transform within a python script
I am currently writing a wrapper, that transform existing data into rosbag2 files using mcap. So far it works for Images, Lidar, IMU data. However, using Odometry looks good so far, although the ...
0
votes
1
answer
50
views
Can someone resolve the error I m facing on Ubuntu 22.04 LTS with ROS (Humble hawksbill)
I'm following this video series, ROS2 Tutorials - ROS2 Humble For Beginners, and the ROS 2 Documentation: Humble, for ROS2 installation. I copy-pasted the first six commands mentioned in the ...
1
vote
1
answer
57
views
Publish an Array of Values as Wrench Message in ROS2 and Python
I'm using a geometry wrench message, and I would like to send 4 values at each force and torque axis. I tried something like this:
...
1
vote
0
answers
58
views
How to use Python virtual environments with ROS 2 building with --symlink-install flag?
I want to use a Python virtual environment with ROS 2 and build my package with colcon build --symlink-install.
I followed this simple tutorial: Running ROS2 Nodes ...
1
vote
0
answers
28
views
cv2.stereoRectify works only when the rotation and translation are from camera 2 to camera 1
I am using the euroc-mav dataset to create a disparity map from stereo images: https://projects.asl.ethz.ch/datasets/doku.php?id=kmavvisualinertialdatasets.
In this dataset the cameras are already ...
0
votes
0
answers
90
views
How to execute non-ROS Python code in launch files?
I have an application where I'm happily using *.launch.py files BUT I would love to run non-ros (no node, no launch, etc) to populate some arguments of the downstream launch actions. Overall this ...
0
votes
0
answers
27
views
Read encoder's data with RPi + ROS2
i'm actually doing a mecanum drive robot that has 4 DC motors (polulu) with encoders.
To drive my robot, I wanted to measure the speed of my motors to adjust the Duty Cycle with a simple PID.
However, ...