Questions tagged [python]
Python is a widely used high-level, general-purpose, interpreted, dynamic programming language.
151
questions
0
votes
0
answers
16
views
How can I make the iRobot Create turn by the specified angle in Webots?
I am trying to use the iRobot Create in Webots for a project on vacuum cleaning. I am impressed by the fact that Webots contains the create.wbt world as well as ...
0
votes
1
answer
42
views
Python's all tf frames function in ROS2 only returns some frames
Spining off of 347857#comment that seems ROS1 code, I tried to get all tf frames in Python but the following quick dirty code goes into "No frames" else block, while I verified that tf ...
1
vote
1
answer
44
views
Decision behind ROS2's Python tutorial switched from src layout to flat layout
As far as I can see, the entire tutorial suite of ROS2 (citing Creating a package (docs.ros.org) to begin with) has switched from what is called "src layout" to "flat layout" (i.e. ...
0
votes
0
answers
39
views
Build ROS 2 messages with Python 3.7
I'm required to build some ROS 2 custom messages using Python 3.7.
They're meant to be used with a library only available for 3.7, so the only way of importing these messages is if they're built for ...
0
votes
0
answers
14
views
How to disable python relay package creation by catkin
As explained by this doc, catkin_python_setup() in the CMakeLists looks for the setup.py for a Python package, and also generates a "relay package":
This creates relays for all scripts ...
1
vote
0
answers
32
views
WEBOTS - Connect a external Tkinter Script to main controller?
I have a WEBOTS Simulation with an automobile. Now while WEBOTS provides a camera overlay, I want to display the result of image processing along with sensor data in a comprehensive manner.
For this I ...
0
votes
0
answers
32
views
Python How to fuse road segmentation data from an image to AOA data(distance, angle)
I have road segmentation data which is highlighted by the semi-transparent blue color.
It is an Numpy matrix with 0 means not road, 1 represents road.
I also have AOA data which tells the distance and ...
1
vote
1
answer
28
views
Minimum distance that can be measured using Rplidar A1M8
can you please explain what is the minimum distance that can be measured using RPliadr A1M8
1
vote
1
answer
241
views
How to stop writing to a bag file when using the rosbag2_py API?
I'd like to modify this example of recording a bag file from a ROS node written in Python to be able to effectively start and stop recording using a service call. My thought is I could create ...
0
votes
1
answer
313
views
How to bridge rclpy with Python's asyncio?
In my opinion, the correct way of running ROS2 nodes inside a larger asynchronous Python application (e.g., an application built around asyncio) is not particularly obvious. I think a good solution ...
0
votes
0
answers
22
views
Create A Half Cylinder in PyBullet
I would like to ask if it is possible to use the PyBullet function createCollisionShape to create a half cylinder in PyBullet? If so, how should I do that?
Or, is there any other function in PyBullet ...
1
vote
2
answers
440
views
SetuptoolsDeprecationWarning in ros2 Humble
I was trying to follow this tutorial in the official documentation of ros2 Humble for Integrating launch files into ROS 2 packages and ran in to the below given error after doing trying to perform a ...
1
vote
2
answers
84
views
Question about getting global coordinates of lidar point cloud from relative in Webots
I need to do custom mapping of surroundings with lidar using mobile robot in Webots. What I use for that:
GPS for getting robot position.
Compass for getting direction robot.
Lidar for getting info ...
0
votes
2
answers
246
views
Why are installed ROS 2 humble python packages split in two directories
Cross-post on ROS answer
Since ROS 2 Humble on Ubuntu 22.04, I noticed that now ROS 2 Humble python packages are split between two directories.
...
0
votes
1
answer
233
views
Pico W does not connect to my phone's hotspot
I am trying to connect my Pico W to the hotspot that I have. The password and the name of the hotspot are in a file called "secret." I found the code online and when I try to run the code ...
0
votes
1
answer
46
views
Number of threads keep increasing in htop when running my python ROS node with 2 threads
I am writing a ROS node to read CAN data (linear x speed, and direction of motion i.e. rev or fwd) from my vehicle and my steer-by-wire system (encoder data for angular z). Both CAN interfaces are on ...
0
votes
2
answers
78
views
simulating transfer function with python
I've been trying for quite a while to simulate a transfer function using control library on python but I keep getting the wrong result, does anyone know the reason?
This is what I get:
This is what I ...
0
votes
1
answer
71
views
Definition of Collision Frame and Inertial Frame in PyBullet or Other Simulation Software
I am doing simulation of my robot with PyBullet now, but I guess this question applies to other simulation software as well.
When I am using the functions ...
0
votes
0
answers
165
views
error with Breezyslam (Descriptor length mismatch)
so I was working on a slam project and using the Breezyslam repo link, I am always getting this error, I don't know where I am getting it wrong, can someone help?
...
0
votes
0
answers
76
views
how to use PyTorch for creating, training and testing machine learning model and then using it at ros2 node for inference and robotic control?
I know, my question is very vague but let me explain it in detail. I am a software engineer and recently learned about ROS2 and its capabilities and want to know about the process of integrating ...
0
votes
1
answer
59
views
How to distribute ros package developed on windows?
I am using ros1 neotic on windows 10 to develop ros package with python. I checked this link Packaging your ROS project as a snap but it's telling only how to share packages developed on linux machine....
1
vote
0
answers
889
views
PointCloud2 parse to xyz array in ROS2 with python
In ROS1 you can convert a pointCloud2 message to an xyz array with sensor_msgs.point_cloud2.read_points().
Unfortunately, this option has not yet been adapted for ...
0
votes
1
answer
151
views
ROS: frame transformation (tf) + TimeSynchronizer?
How to get a frame transformation using TimeSynchronizer?
I am developing some 3D recognition application for a mobile robot. The robot has an RGB camera, depth camera, and uses rtabmap for SLAM, so I ...
0
votes
1
answer
118
views
Diff-drive robot - Obstacle avoiding - random walk
I have implemented a logic-based algorithm for obstacle avoidance in a differential drive robot with 5 IR sensors.
I want the robot in space, for example, a square room, to move freely and avoid ...
0
votes
1
answer
144
views
Get rotation of IMU data snapshot
I received snippets of data of an IMU with 9 DoF in motion. For these I wanted to get their rotation by angles relative to the earth frame. My goal is to receive ...
0
votes
0
answers
30
views
Hardware Requirements to run Image Recognition Model on Raspberry Pi
I have trained and saved a Tensorflow model that would detect if workers are wearing a PPE or not.
I want to deploy it using the Raspberry Pi hardware. Following is the list of hardware that I think I ...
0
votes
0
answers
43
views
Which scan matching technique is most suitable for 2D laser range data?
I have odometry data [x, y, theta] and 2D laser range data from a robot moving in a building.
Based on a new scan, I want to match it with a previous scan to get a corrected pose estimation for the ...
1
vote
2
answers
412
views
Spawn robot model using rospy in Gazebo
I am trying to spawn my robot model using rospy in my python interface to Gazebo.
In the launch file, I spawn the robot using:
...
0
votes
0
answers
15
views
Sending livefeed wirelessly from a Canon Camera to an Arudino/Raspberry Pi
I have a camera which is WiFi enabled, I was wondering if can do inference and detection wherein I put my model on an Arduino, and do the detection with a high resolution camera instead of something ...
0
votes
1
answer
56
views
Kalman filter problem with the output
i want to use kalman filter to estimate my phone position, the measurments data is at this point just the accelerometer and the sampling rate is 3ms, i used the library pykalman, i have also wrote my ...
0
votes
1
answer
75
views
Vision programming with OpenCV
I am currently working on a project on NiryoOne which requires facial detection of a person through NiryoOne camera (ELP SONY IMX). The code that I am using works on my laptop running ubuntu. However, ...
0
votes
0
answers
19
views
Robotics processing pipeline that is agnostic of ROS or other data source
I'm rather new to the field of robotics and am wondering how to go about setting up my system architecture. I'm trying to build a SLAM pipeline (initially very simple based on 2D point clouds, with ...
1
vote
1
answer
230
views
Control a differential drive robot
I have some questions about implementing a mobile robot. I have an old construction mobile robot wherein this robot the main controller has been removed, and I put in its place a Raspberry Pi 4. I ...
0
votes
1
answer
825
views
How to loop over each timestep in rosbags using Python?
I am using rosbag api to record rgb, depth and imu data coming off a robot. For an offline Visual Odometry experiment, I am in need of synchronizing RGB data with the imu data at the correct timesteps....
0
votes
2
answers
173
views
Sending Universal Robots UR5e to specific place Using Camera
I have a UR5e installed with a simple camera on its end effector. The robot is at a known position (Cartesian pose/angles and joint angles)
Using the camera I took a picture of a QR code and got the ...
0
votes
0
answers
151
views
Finding 6 angles for UR5 a 6Dof Robot
I am looking for a method to find 6 rotation angles for the 6DOF, 6joint, 5 link UR5 robot. these angles would be used to control UR5 through ROS but unfortunately I cant find any way to find these ...
0
votes
1
answer
1k
views
What is Wrong With My Stanley Controller for Car Steering Control
Hope everyone is doing well.
I am just trying out Microsoft Airsim for few days and few hours ago I wanted to implement a Path Tracking Algorithm for an Autonomous Car. For the lateral control, I ...
1
vote
1
answer
918
views
How do you model a physical robot (diff drive) in python?
I am using PyGame to simulate the motion of a differential drive robot. So far, I have used the standard diff drive kinematics, multiplying by delta time, and I have the motion working as expected.
...
1
vote
2
answers
277
views
3D Rigid Body Pose Optimization in flat euclidean space
I am confused about what is the best way to optimize the 3D pose of an object and the best way to parametrize the translation and rotation for optimization in flat euclidean space.
Assume I have a ...
1
vote
1
answer
115
views
simple ROS script terminating without displaying errors
I am using ROS melodic on ubuntu 18.04, turtlebot 2.
I tried to create a simple ROS program, that tries to make the bot follow a specified path. My gazebo world looks like this:
The task is to try to ...
0
votes
0
answers
67
views
How to drive a motor by Python
I need to drive any small motor (with small delay) by Python without low level programming. What hardware and software I need? Does "Robot Mesh Studio" fit for this? I want to make a robotic ...
0
votes
1
answer
157
views
Rospy: Why does the loop not get interrupted?
I am working on the software for an autonomous Raspberry-Pi based robot which should keep moving for 2 minutes unless an unintended key is fed to it as input. Upon receipt of the unintended key, the ...
3
votes
1
answer
719
views
When reading serial data between Arduino and a node, it hangs. How can I properly send and read data?
I'm using ROS2 foxy with no libraries installed. It runs on an Ubuntu 21.04 x64 machine with kernel 5.8.0-59-generic.
I created a project with the goal of controlling an Arduino using python serial in ...
2
votes
1
answer
398
views
How to program to generate robot URDF(Serial manipulator) when having stl file of each link with Python
I've tried :
to use obj2udf library(PyPI) then It can generate 1 URDF per 1 STL(it doesn't work because I can't find how to program to change link name or add link and can't combine STL)
so now I ...
1
vote
1
answer
505
views
Having Issues Importing and Using RLGlue locally with Python For Reinforcement Learning
I'm going through an online course on Coursera for Reinforcement Learning that makes use of RLGlue. I want to try to run and adapt the code locally, but am having issues using RLGlue, and not sure why....
0
votes
1
answer
113
views
Relative scale problem
I am doing Monocular Visual Odometry, and I have problem with relative scale. Most of the time its value is between 0.8-1.1, but sometimes it goes crazy and it has value 3,4 and once it had value 25. ...
1
vote
1
answer
197
views
Eliminating drift generated from double integration of acceleration signal using Envelope Method
I'm trying to remove the drift generated upon the double integration of a noisy acceleration signal. But this question discusses only removing the drift upon single integration to generate velocity ...
1
vote
1
answer
259
views
Path planning for robot car on grid
I am currently doing a project as my hobby. I am trying to simulate a robot car in a grid arena. Below is the image of the arena:
The start point of the car is the bottom-right corner(dark green ...
1
vote
2
answers
394
views
How do you send multiple data bytes to Irobot Roomba via python serial
So I'm trying to send commands to my Roomba Discovery via python serial and it works fine as long as it only requires the command opcode. The commands that require additional data bytes (like specific ...
-2
votes
1
answer
147
views
AttributeError: darknet_ros_3d instance has no attribute 'Xmin' [duplicate]
After publishing the messages from another package, I am using darknet_ros_3d package and writing a subscriber. For saving the messages into variables for the later use, I am following the answer ...