People who code: we want your input. Take the Survey

Questions tagged [python]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
40 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. ...
0
votes
0answers
10 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....
2
votes
1answer
222 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. ...
3
votes
2answers
1k views

Transform timestamped messages recorded in a bag file using tf messages

I have a .bag which contains recorded messages on topics /topic1 and /topic2. The messages ...
0
votes
3answers
376 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 ...
3
votes
1answer
6k views

Determine the relative camera pose given two RGB camera frames in openCV-python

I would like to determine the relative camera pose given two RGB camera frames. I assume there's overlap in field of view between the two cameras, what I am looking for ultimately is the rotation and ...
0
votes
1answer
41 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. ...
0
votes
1answer
219 views

Plot a map using wheel encoder and IMU data

I want to plot a map( with matplotlib or any other library ) using a wheel encoder and IMU data. Eg:- For every 10cm robot moves it should draw line (in a graph) and draw angles depending on the data ...
0
votes
0answers
16 views

Ardupilot - Dronekit Setting the Current Location of the Vehicle

hope you are all doing well. I am doing in a project in which I receive GPS data (Longitude, and Latitude) from an Android device via an SQL server. What I am trying to do is to send this Longitude - ...
0
votes
1answer
37 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 ...
5
votes
1answer
598 views

Wait simulation time in a non realtime ROS simulation in Python

I want to control a quadrotor with a Python script and run the simulation as fast as my laptop can, not only in real time. I've modified my world and now the simulation runs with 7-10 real time factor....
3
votes
1answer
72 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 ...
0
votes
0answers
64 views

6DOF kinematic robotic arm programm

I am trying to find a well documented library which I can use for my 6dof robotic arm (https://www.thingiverse.com/thing:1693444) But I cant find anything :( Does anyone have a python/c code for ...
0
votes
1answer
151 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 ...
0
votes
1answer
85 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: ...
1
vote
2answers
44 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
1answer
2k views

MSP (Multiwii Serial Protocol) receiving data with pyMultiWii issue

I want to get telemetry data from my flight controller (Matek F405-CTR) and send control commands to it via MSP protocol. I've already configured UART3 port on Matek in Inav configurator (look at pic)...
1
vote
1answer
522 views

ROS packages for *pre-planned* path navigation rather than path generation? (Turtlebot3/ROS)

I am working on a project in which users will create paths fully constrained in terms of position (using a separate piece of software), and a robot will periodically follow those paths. We are using a ...
1
vote
1answer
32 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
2answers
1k views

Error starting image_view video_recorder using launch file

To record .avi video, I am using video_recorder for the image_view package. I want to do this through the launch file. Here is the how I put it in there ...
1
vote
4answers
466 views

Best microcontroller for develop a robot for the market

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 ...
2
votes
3answers
787 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 ...
2
votes
1answer
916 views

Python PID tuning - Parrot Bebop 2 - Target follower - ROS

I'm developing a PID controller for making the drone follow a detected object. I used as reference these topics: Ttracking-objects-from-camera-pid-controlling-parrot-ar-drone Tracking-objects-...
-1
votes
1answer
88 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 (...
-2
votes
1answer
47 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 ...
-1
votes
1answer
60 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: ...
0
votes
0answers
109 views

ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type

So I followed this guide to install opencv on Ubuntu 16.04 LTS https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/. When I try running a python script that imports cv2 I get ...
1
vote
2answers
532 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 ??
0
votes
1answer
59 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 ...
0
votes
1answer
109 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 ...
0
votes
2answers
46 views

I want to actuate a motor based on a wav file, but it has too many samples per second

I am trying to actuate a simple DC motor based on a wav file. At the moment I am using the "cat vs dogs sounds" from Kaggle. One of the wav files in this DB looks like this: These audio files are ...
2
votes
1answer
84 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 ...
2
votes
0answers
47 views

How to implement stop sign XML cascade? [closed]

After training my RC car, I use the following command: python drive.py --model trainmodel.h5 This gives me IP where I can go and see if the testing was successful ...
0
votes
0answers
74 views

ModuleNotFoundError: No module named 'second.core.non_max_suppression.nms'

I am using Anaconda base environment for second.pytorch of ubuntu 16.04 after executing the following: nvidia-docker run -it --rm -v /media/yy/960evo/datasets/:/root/data -v $HOME/pretrained_models:/...
2
votes
1answer
168 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 ...
0
votes
2answers
124 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: ...
0
votes
3answers
949 views

Help with code that is supposed to drive a servo controller

I posted a similar question before as I was just getting started with the project but I wasn't specific enough so got a weak response from the SE community. But now I am at a point where I have Python ...
2
votes
0answers
94 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 ...
0
votes
0answers
38 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 ...
0
votes
1answer
41 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 ...
7
votes
1answer
865 views

Numpy alternatives for linear algebra and kinematics in python?

Are there any decent python numerical package libraries besides numpy for python? Numpy relies on gfortan which itself must be compiled correctly for your platform to avoid hidden/insidious numerical ...
0
votes
0answers
42 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 ...
0
votes
2answers
853 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 ...
0
votes
2answers
2k views

Uploading a trained ANN to an ESP32 board

I am working on a project that requires training a neural network with humidity and temperature values. After spending a while googling on how to run a neural network on ESP32 (Wemos LOLIN D32 Pro), I ...
0
votes
0answers
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 ...
1
vote
0answers
40 views

Inverse Kinematics of Puma 566 giving low angle results with DH convention

I am new at the robotics area, and i need to deliver an activity until this week in my college based to solve the inverse kinematics problem from an article that doesn't have any code done, and after, ...
0
votes
1answer
37 views

What should i do to rebuild robot salto from Berkeley uni as a mechanical engineering undergrad?

What are the main components of robot salto? What are the necessary skills and knowledges to reproduce it? Also as you can see, i am a mecheng and i want to reproduce this robot as finishing project ...
4
votes
1answer
4k views

Is rospython subscriber thread safe?

I'm trying to write a python node, which has one class and two member functions as callback functions. so a TimeSynchronizer and Subscriber in a node. I saw in this link and tested that python ...
1
vote
1answer
57 views

Image data fusion

I have three cameras separated by some distance, looking at a scene. I have calibrated them using checkerboard and I have their respective intrinsic parameters and their pose and rotation matrix, I am ...
1
vote
0answers
56 views

Pausing at positing in GRBL while holding motor current

I'm trying to get grbl to move the carriage of my 2D scanner to a specific position, pause there for a certain amount of time (until the sensor does its thing), and then proceed to the next position ...