Skip to main content

Questions tagged [python]

Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 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=...
user123456098's user avatar
0 votes
1 answer
23 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 ...
Simon's user avatar
  • 1
0 votes
0 answers
9 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 ...
Abbas's user avatar
  • 1
0 votes
0 answers
14 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 ...
Abbas's user avatar
  • 1
0 votes
1 answer
27 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 ...
masteryoda436's user avatar
0 votes
0 answers
7 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, ...
Sai Puneeth's user avatar
2 votes
0 answers
39 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 ...
AKORA's user avatar
  • 21
0 votes
0 answers
14 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 ...
Dennis Schüthe's user avatar
0 votes
1 answer
41 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 ...
kabir's user avatar
  • 1
1 vote
1 answer
35 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: ...
Mohamed Abduljawad's user avatar
1 vote
0 answers
22 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 ...
hugoyvrn's user avatar
1 vote
0 answers
21 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 ...
Idan Aviv's user avatar
  • 111
0 votes
0 answers
57 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 ...
Ignacio Vizzo's user avatar
0 votes
0 answers
15 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, ...
Erudil's user avatar
  • 1
0 votes
0 answers
27 views

Porting an exsiting Python Project to ROS2

I have a conceptual question about using ROS2 with other projects that I haven't been able to find a satisfactory answer for. I work with a few complete systems written in Python that are self-...
firthc's user avatar
  • 23
0 votes
2 answers
66 views

ROS2 Wrapper for a Python-based Sensor

I have a force sensor that I want to use with ROS2, however, I don't know how to create a ROS2 wrapper for it. All I found was this tutorial that creates a ROS1 wrapper. Below is a snippet of the ...
Mohamed Abduljawad's user avatar
1 vote
1 answer
28 views

No Python executables after colcon build (ament_cmake_python)

So I'm trying to create a ROS Humble Python pkg, but after running colcon build --symlink-install and source install/setup.bash ...
mink4sure's user avatar
0 votes
0 answers
12 views

Error with cv2.calcOpticalFlowFarneback

...
oliver's user avatar
  • 1
0 votes
0 answers
8 views

i wanna blink a led with pwm and a potentiometer attached to a ADS1115 modulle using ros2 pubsub package

i had a while ago with some help from this forum sending potentiometer values from a publisher node to a subscriber node to blink a led in pwm but the led doesnt seem to receive values the talker node ...
Jonathan Dawsa's user avatar
0 votes
1 answer
20 views

ROS Subscriber receives a number of messages larger than the number of messages published by the publisher

I'm using ROS noetic and Python, my node publishes a message if some conditions are met, the queue_size is set to 1. When I subscribe to the published topic I can see that the subscriber is receiving ...
Franci's user avatar
  • 1
0 votes
0 answers
16 views

Подключение дополнительных камер к образу который использует ROS

Всем привет. В ROS не разбираюсь. Столкнулся с проблемой подключения дополнительных камер на raspberry pi 4 с использованием образа clover_v0.23.img. Моя зада состоит в том, чтобы подключить камеру ...
serpent's user avatar
0 votes
1 answer
30 views

I wanna publish a integer from potentiometer using a ADS1115 module value to control a led with a ros2 python publishersubscriber node

i need to publish a integer from a ros2 talker node with a ads1115 to control a led in a listener node in python like this : ...
Jonathan Dawsa's user avatar
1 vote
0 answers
51 views

Inverse Kinematics for a 2DOF planar robot

I have a simple 2DOF planar robot with this configuration: L1 and L2 are the lengths of my 2 arms. L1 is 245.5mm and L2 is 160mm. Alpha is the first angle (the one of the base) and beta is the second ...
Finn's user avatar
  • 11
0 votes
1 answer
51 views

How to get a Docker container to see ROS traffic from the local host?

I am trying to get ROS traffic from the local host to a Docker container on that same host but I get an error when I run my Docker container. The Dockerfile is: ...
jasonsf's user avatar
  • 49
0 votes
0 answers
9 views

Publish a .bag file in ROS using OpenDR

I'm trying to publish a .bag file for 3D object detection using OpenDR toolkit. I'm new at ROS and I see that they use .txt and .bin files in this PointCloud script to detect the objects in the point ...
ARosOpenDR's user avatar
0 votes
2 answers
19 views

ROS2 colcon ament: includes non-existent path /usr/local/lib/python3.10/dist-packages/numpy/core/include . How to set the folder to python3/?

I build an ament package A on a docker container on the cloud. Then, I build locally package B that has A (which I pulled via conan) as dependency. And I see this error ...
Alessandro Amici's user avatar
0 votes
0 answers
25 views

How to install an external python package in ROS2?

I use pointpillars for object detection on pointcloud data (https://github.com/shangjie-li/pointpillars/tree/master). I have successfully trained and tested the deep network (Conda environment, Python ...
Abbas's user avatar
  • 1
1 vote
1 answer
530 views

Running a ros2 package in virtual anaconda environment in ROS2 Humble

I have created a virtual anaconda environment in ROS2 (HUMBLE). In that I have installed tensorflow , torch. I have a ros2 package in which there are nodes that i want to run using ros2 run. When I do ...
Saurabh Yeola's user avatar
1 vote
1 answer
30 views

Cannot import modules when running unit tests with catkin_make run_tests in ROS noetic with python3

I am trying to write unit tests for my ROS node in python and cannot import files from my src/ directory even though I believe I have configured everything correctly. I will walk through my problem to ...
jheaton's user avatar
  • 21
0 votes
1 answer
112 views

Issue to import python modules in Ros2

I use pointpillars for object detection on pointcloud data (https://github.com/shangjie-li/pointpillars/tree/master). I have successfully trained and tested the deep network. I would like to run the ...
Abbas's user avatar
  • 1
0 votes
1 answer
83 views

ROS2 demo_nodes_py listener "No executable found"?

I have tried to install ROS2 humble in conda using robostack on Linux Mint 21.3. When I do so and activate the conda environment I am able to run cpp nodes but not the python ones. I.e when I try to ...
Tariq Soliman's user avatar
0 votes
0 answers
25 views

Understanding nested node behavior with subscribers

When I run action info, the action subscriber shown is a different node than the node I passed to the AclientClient constructor. Why is this? It's not what I ...
Dan Sandberg's user avatar
0 votes
1 answer
34 views

Robot not loading on gazebo

My Robot is not loading on Gazebo although loading fine on rviz2. Below is my code. On gazebo, only leg_link is loading not any other links. Although on the side ...
Fc0001's user avatar
  • 1
0 votes
1 answer
40 views

where is the beginner_tutorials.srv file in the add_two_ints tutorial?

I am learning ros noetic on the page (https://wiki.ros.org/rospy_tutorials/Tutorials/WritingServiceClient)In the scripts/add_two_ints_server.py file within the beginner_tutorials package, there is a ...
Yongxue Law's user avatar
0 votes
1 answer
45 views

Flickering OccupancyGrid data in RViz2

I'm implementing my own custom message of type nav_msgs/msg/OccupancyGrid to visualize grid-based quantities in a local map (namely virtual pheromones). Back in ROS Noetic, my implementation worked ...
juxyper's user avatar
0 votes
0 answers
13 views

Unable to simulate a differential wheeled robot with kinematics mode (World file and controller code attached)

According to the webots documentation, a robot with differential wheels is automatically detected and can be automatically simulated in kinematics model if the physics node is disabled The Robot ...
Oceanionner's user avatar
0 votes
0 answers
119 views

Ros2 can not import python modules located in subfolders

I am new to use ROS. I use Ros2 Humble on Ubuntu 22.04. I need to import some python codes/modules from different nested folders (or nested nested folders) to a Ros2 python node. The Ros2 node (...
Abbas's user avatar
  • 1
0 votes
1 answer
418 views

rospy.init_node() stuck in loop

I had a problem with initializing a ROS node in python in a larger project. The following minimum reproducible example has the same issue: ...
Kriseiks's user avatar
0 votes
2 answers
887 views

ROS 2 Package Executable Not Found by ros2 run

Environment: Operating System: Ubuntu 22.04 ROS Version: ROS 2 Humble Hawksbill Issue: I have created a ROS 2 package named robot, and I am able to build it ...
Mateusz's user avatar
0 votes
0 answers
50 views

ROS2 serial driver with ROS message subscription

I need to set up a ROS2 python serial device driver that also subscribes to a ROS message. For serial drivers the only publish messages I set up the serial input in a select call like this. Here, the ...
Chris's user avatar
  • 1
1 vote
0 answers
37 views

Kalman filter for heading estimation provides oscillating output

I am designing a Kalman filter for heading estimation in 2D using magnetic compass, gyroscope and wheel encoder. The system state is $ X = [h, w] $ and the measurements are $Z = [h_{mag}, g_z,d_h]$, ...
firion's user avatar
  • 111
0 votes
0 answers
26 views

Open Manipulator python API documentation, or Examples

As stated by the title, is there a way I can access to the python API documentation of the Open Manipulator package? Right now all I can find are service definition such as: https://emanual.robotis....
Ezeuz's user avatar
  • 1
0 votes
1 answer
34 views

Mocking call to third-party module from Publisher

I have just started working with ROS2 in python on an existing project and have to write unit tests to begin with. The production code will run on a raspberry pi, but testing is being done in an ...
Nick's user avatar
  • 101
0 votes
0 answers
67 views

ros2 python package setup for cuda

I'm trying to use a YOLOv8 model to make inference in a ros2 python node (ubuntu 22.04, ros2 rolling,Intel® Core™ i7-7700HQ CPU, GeForce GTX 1050 Mobile). After few tests, I realized that CUDA is not ...
Antonio Bono's user avatar
0 votes
1 answer
303 views

How to get the world coordinates with position and orientation in ROS 2 Humble

I am using ROS 2 Humble. A person is supposed to take a photo of an AR marker with a camera. Inside the system, we can obtain the relative coordinates, position (x, y, z), and rotation, orientation (x,...
aotombo's user avatar
0 votes
0 answers
21 views

Unable to use code to plan the robotic arm, although I have configured moveit and can perform drag planning in rviz

This is my first time asking a question and I don't know what I need to provide to describe the problem as clearly as possible, in simple terms like the title I really don't understand why I can't use ...
liujia yuan's user avatar
0 votes
1 answer
81 views

Already higher than takeoff altitude(not descending)

I have the following Python code that arms and take off the UAV using pymavlink. I am using the px4 flight stake ...
Mubashir's user avatar
0 votes
0 answers
32 views

ROS2, why killing a child process node also stops parent node?

Based on this code, under Windows using Humble release, I start/stop a child process running a demo_nodes_py's talker: ...
jpo38's user avatar
  • 121
1 vote
0 answers
51 views

ArUco Markers Distance Estimation Accuracy Difference

The distance estimated (in cm: Because input size of ArUco Markers in cm too) using the code line after importing math module: ...
Mhd Afz's user avatar
  • 111
1 vote
0 answers
103 views

Gazebo_ros launch

all !! Try to do first project https://github.com/Dizog84/articubot_one making all as joshnewans teach) youtube articulatedrobotics.xyz Steps before I have 22.04 Ubuntu LTS ros2-humble Stay on second ...
Dizog Dizog's user avatar

1
2 3 4 5
19