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
9 views

Sensor for obstacle avoidance

I am working on an obstacle avoidance system using ultrasonic sensors and ROS2 on jetson nano. I saw HC-SR04 to be compatible with ROS2 but it had some issues on jetson. Wanted to know if any other ...
user avatar
0 votes
0 answers
8 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 ...
user avatar
0 votes
1 answer
39 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 ...
user avatar
0 votes
1 answer
30 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, ...
user avatar
0 votes
0 answers
13 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 ...
user avatar
0 votes
0 answers
8 views

ros noetic python library installation with virtualenv pip

I'm trying to use pip/python of my virtualenv along with the neotic and moveit. My PYTHONPATH: ...
user avatar
  • 1
0 votes
1 answer
50 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 ...
user avatar
0 votes
0 answers
15 views

Cannot write Geofence points to Pixhawk using pymavlink

I am trying to write Geofence location points to my pixhawk device using the python pymavlink library. the code I have been trying is attached. Arming message works fine, however, I cannot send fence ...
user avatar
0 votes
1 answer
117 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....
user avatar
0 votes
1 answer
41 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 ...
user avatar
  • 101
0 votes
0 answers
41 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 ...
user avatar
0 votes
0 answers
17 views

How to program a custom microcontroller to USE CUES FROM A PC to change the position of a servo motor? (Without using Arduino/Raspberry Pi)

I want to program a custom microcontroller that ideally connects to a camera and performs some sort of image analysis and do something(like change the position of a servo motor). The initial idea is ...
user avatar
0 votes
1 answer
357 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 ...
user avatar
  • 306
1 vote
1 answer
490 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. ...
user avatar
  • 11
0 votes
0 answers
22 views

Threading on Microsoft AirSim with Python Throws Type Error

Hope everyone is doing well. I have just started use AirSim for some computer vision simulations. Right now I am trying to implement threading for navigation purposes with Python. As a starting point,...
user avatar
  • 306
1 vote
1 answer
128 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 ...
user avatar
  • 111
1 vote
1 answer
69 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 ...
user avatar
  • 111
0 votes
0 answers
52 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 ...
user avatar
0 votes
1 answer
65 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 ...
user avatar
  • 101
0 votes
0 answers
230 views

How to combine URDF files in pybullet?

I have a URDF file for the Kinova Gen3 robotic arm (6 dof) and a URDF file for a suction end effector that was built for a UR5 arm. I am able to load the file for the arm along with a table and some ...
user avatar
3 votes
1 answer
307 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 ...
user avatar
2 votes
1 answer
178 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 ...
user avatar
0 votes
1 answer
290 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....
user avatar
  • 1
0 votes
1 answer
82 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. ...
user avatar
  • 1
1 vote
1 answer
86 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 ...
user avatar
1 vote
1 answer
99 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 ...
user avatar
  • 113
1 vote
2 answers
152 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 ...
user avatar
  • 11
-2 votes
1 answer
115 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 ...
user avatar
-1 votes
1 answer
261 views

How can I save messages publishing from a ROS package into a variable?

I am using darknet_ros_3d package and writing a subscriber. So far, I have followed the code given as under: ...
user avatar
-1 votes
1 answer
359 views

How to subscribe message coming from a package of ROS into Python code of another package?

I am using darknet_ros_3d package and getting the published 3D coordinates. Now I need to subscribe these coordinates into a Python file (...
user avatar
1 vote
2 answers
856 views

ROS TURTLESIM using PYTHON

In ROS TURTLESIM, While moving the turtle in circle using the linear velocity and angular velocity , how do i track the distance so as to stop the turtle moving after one revolution ??
user avatar
1 vote
4 answers
865 views

Best microcontroller for develop a robot for the market [closed]

I am planning to produce and release a robot to the market and also worked with different platforms for development such as arduino,pic,micropython/python. But now I want to do this professional. I ...
user avatar
0 votes
1 answer
66 views

Res-Scaling method beats PID controller. How?

Scenario: I have a robotic arm that has a (1D) lidar on its end, to orient itself with respect to the slant table in front of it. The lidar returns pretty accurate distance values in mm. The motor ...
user avatar
  • 133
0 votes
1 answer
420 views

Are there any tutorials for OMPL in Python?

I want to learn and understand the Open Motion Planning Library (OMPL) through Python as I don't have much experience with C++. Almost all tutorials are written in C++ and there are some demos in ...
user avatar
  • 1
2 votes
1 answer
133 views

2D Visual-Inertial Extended Kalman Filter

I am trying to implement an Extended Kalman filtering for combining IMU data and visual odometry in a simple 2D case where I have a robot that that can only accelerate in its local forward direction ...
user avatar
  • 121
0 votes
1 answer
222 views

ROS2 and TypeError when publishing custom message to Topic

I have defined a custom message: uint8[] data The custom message is imported in my Node class with no problems: ...
user avatar
  • 111
0 votes
2 answers
211 views

OpenCV4.2 and Ubuntu16.04 with python2.7?

Summary: I'm using new vision of opencv, opencv 4.2 with ubuntu 16.04 and python 2.7 After built cv_bridge, the output is: ...
user avatar
  • 101
0 votes
1 answer
102 views

Simulating sensor readings based on an existing Alan Variance Analysis

My goal is to model an accelerometer and a gyroscope based on real hardware. I understand deterministic errors like bias and scaling but the different types of non-deterministic errors are difficult. ...
user avatar
  • 41
0 votes
1 answer
204 views

How to find visual odometry by video from cellphone camera mounted on robot?

I am writing codes in python for visual odometry from single camera. I used cell phone camera for testing. I took video of 35 sec with camera moving. I used code below to read first image ...
user avatar
2 votes
0 answers
141 views

Applying initial guessing to LiDAR point cloud for ICP processing in Graph SLAM

I am currently in the process of implementing Graph SLAM using ICP and g2o in python 2.7 The data I have are pose data (4 x 4 transformation matrix) and lidar data ( in the format of [x y z 1] with ...
user avatar
1 vote
3 answers
613 views

Path planning algorithm better than RRT* and Artificial Potential Field

Hello robotics stack exchange community, hope my message finds you well during these challenging times. I need an opinion regarding path planning algorithms. Goal I am looking for a path planning ...
user avatar
2 votes
1 answer
487 views

How do I convert centre-returning joystick values to dual hobby-motor direction?

Currently my setup is: 2x hobby TT motors connected to a Pi Zero with a motor HAT Python script running on the Pi which runs a Blynk python client and controls motors via the gpiozero library Blynk ...
user avatar
  • 21
0 votes
0 answers
43 views

Use Realsense camera to get the camera image

I have to use LIDAR in my project. I was searching for some LIDARs with a camera and came across the Intel RealSense d400 series. I know it has a camera but please suggest a way to use that camera ...
user avatar
3 votes
3 answers
2k views

Are Rospy subscriber callbacks executed sequentially for a single topic?

Suppose a ROS node receives new batch of data on a topic while the previous batch is still being processed by callback. Will ROS wait for its completion or will it spin a new thread and run both at ...
user avatar
  • 31
0 votes
1 answer
134 views

Dynamixels (AX-12A) no longer detected after id change

I have 8 dynamixels that are connected together. Everything worked fine until I changed all their ids to 200,201,202, ... To change their ids, I used this python library. Now, none of my motors are ...
user avatar
4 votes
1 answer
84 views

Make robot drive as far from obstacles as possible

I am trying to make robot drive around the room, avoiding obstacles with pathfinding. The problem is I get few waypoints from pathfinding algorithm for robot to drive to (green dots), but it drive a ...
user avatar
  • 41
0 votes
0 answers
141 views

G-code to cartesian co-ordinate converter

Hope you all are doing well. So I built a 5 bar linkage mechanism using arduino and python.It uses 2 servos, an arduino mega, a 12v power supply,a dc-dc step down converter to power everything. The ...
user avatar
0 votes
2 answers
1k views

/odom topics not matching ERROR

I have an existing ROS workspace which was built in C++. I am trying to implement a node built by The Construct in python which reads distance travelled from the ...
user avatar
3 votes
1 answer
369 views

How to synchronise data for fusion in Kalman from multiple sensors with different timestamp information?

I'm using Kalman filter to track the position of a vehicle and receive position data from 2 sensors: A GPS sensor and an Ultrasonic sensor for which I want to implement sensor fusion into the Kalman. ...
user avatar
  • 31
0 votes
0 answers
29 views

How to make x variable change each time and read its value from txt file

I am working on my undergraduate project and this is my first time in using use python to control parrot bebop 2 drone and use BCI or BMI technology. I have x variable (int) and I want to read its ...
user avatar
  • 1