Questions tagged [python]

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

34 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
1answer
324 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....
2
votes
0answers
43 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 ...
2
votes
1answer
48 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 ...
2
votes
1answer
549 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-...
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)...
2
votes
2answers
616 views

Transform timestamped messages recorded in a bag file using tf messages

Note: this question was also asked in the ROS official Q&A website, but even after one week nobody has given me an answer. I have a .bag which contains ...
1
vote
1answer
32 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 ...
1
vote
1answer
115 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. ...
1
vote
0answers
38 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, ...
1
vote
1answer
189 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
0answers
29 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 ...
1
vote
0answers
70 views

Mission Planner: How to create a custom Waypoint Command

I am trying to set up a waypoint in Mission Planner that causes the drone to hover, take sensor data from a custom sensor, then either land or continue hovering based off of what the sensor data says. ...
1
vote
0answers
84 views

help to find the bug for calculating inverse kinematic using jacobian

I am calculating inverse kinematic for 5dof robotic arm using Jacobian matrix (first time). i used following formulas to do my calculation and also implemented in my code. for more information please ...
1
vote
0answers
52 views

Writing IMU accelerometer data into as twist messages into cmd_vel

I am reading accelerometer data from the wiimote /wiimote/state topic. A sample of the data I'm working with is as follows: ...
1
vote
0answers
2k views

python code for closed form inverse kinematics solution

I solved the inverse kinematics of a 4DOF robotic arm (which is not planar) and I wrote this code bellow in python. The coordinates for each joint is: I considered the first three joints as a wrist ...
1
vote
0answers
280 views

Continual error attempting to use MicroPython with HC-SR04 sensor on Bit:Bot

On my Bit:Bot from 4Tronix ([see here])1 I have an HC-SR04 ultrasound sensor attached. It uses solely pin15, for both trig and echo. I am able to use Microsoft MakeCode 'block editor' to get a ...
0
votes
1answer
24 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
0answers
19 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:/...
0
votes
1answer
18 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: ...
0
votes
1answer
26 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
23 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
95 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 ...
0
votes
0answers
32 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
0answers
53 views

BlueZero Remote API from V-rep using python

I have some issues when I am trying to connect python to v-rep using Blue Zero based remote API. The community of v-rep didn't have enough details and I have followed their information such as: copy ...
0
votes
0answers
45 views

Hand Eye Calibration Formula

I'm trying to write a Python formula so that my robot arm can pick up a tennis ball (I'll be adding a gripper soon). The depth camera is mounted near the toolhead. Any help on writing this formula or ...
0
votes
0answers
26 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
0answers
29 views

Pi 3 drone that can be automated using Python

For the final project of my computer science class I would like to build a 3D printed drone using a Raspberry Pi 3 that can be automated using python script. I am at a loss regarding what parts I ...
0
votes
0answers
38 views

Building trac_ik_python for Windows 10 using VisualStudio2019

I’m trying to build TracIK-python with Microsoft Visual Studio 2019 for Windows 10 and am making use of the available trac_ik_wrap.i file in the swig folder to ...
0
votes
0answers
24 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 ...
0
votes
1answer
90 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
58 views

Real-time python reinforcement learning library

I'm looking for a reinforcement learning library that can be used for real-time robot control. What I first had in mind was ROS to describe the robot, Mujoco to simulate physics, and OpenAI gym to ...
0
votes
0answers
137 views

Python, Universal Robots, Ethernet problem

This is in regards to a UR 10 running 3.5.3.10825. For the script urx_get_robot.py ...
0
votes
2answers
888 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 ...
0
votes
0answers
311 views

What dependencies do I need for USB programing in python with pyUSB?

I am trying to get the usb.find command to work properly in a python script I'm writing on Angstrom for the Beagleboard. Here is my code: ...