Skip to main content

Questions tagged [python3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

When to call rospy.init_node() in a ROS client?

I am new to developing ROS services and clients. All of the tutorials I found online are quite simple. Most refer to the client as the client node yet I never see a call to ...
jasonsf's user avatar
  • 49
0 votes
1 answer
20 views

How to simultaneously execute 2 turtlesims inthe same window

I have a simple turtlesim program with me and was trying to run it with roslaunch. I wanted to have 2 turtlesims in the same window and a common python script to execute both the new nodes created ...
ashwinjoseph's user avatar
0 votes
0 answers
25 views

How do I determine the order of ROS messages in Python

I am using ros-noetic. I am receiving ROS messages and putting them into a python Queue which is FIFO. I suspect but I am not sure that what is happening is the subscriber callbacks are called in a ...
jasonsf's user avatar
  • 49
0 votes
0 answers
18 views

Turtlebot3 not loading in gazebo (ROS2 Galactic, Gazebo-11)

I am trying to load a Turtlebot 3 waffle in the house world, get its laser scan data in Rviz2 and then navigate to 3 checkpoints with the help of rviz2 after mapping the world. The commands I am using ...
sdhar04's user avatar
  • 11
7 votes
2 answers
1k views

"colcon_core.package_augmentation" Error When Building Python Package With Colcon in ROS2 Humble

I get the following error when trying to build my python package with Colcon build ...
umut373's user avatar
  • 73
0 votes
1 answer
22 views

no transform from xxx to xxx after installing conda

the previous package I created can be used smoothly.However,after installing conda and pytorch,the robot description cannot be put on screen correctly.The early verison of robot description in rviz ...
yz x's user avatar
  • 3
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
0 votes
0 answers
13 views

Fault Tolerant Action Server Client Design?

My ROS 2 Humble Create3 robot Dock action client sometimes does not receive a dock action result (callback sometimes not called). The robot log shows the action goal succeeded, and my client node ...
Cyclical Obsessive's user avatar
0 votes
1 answer
103 views

What is the ROS2 equivalent of rospy.AnyMsg?

Currently in ROS I am using rospy.AnyMsg. I would like to convert the ROS code to ROS2. I tried doing an import AnyMsg from rclpy...
jasonsf's user avatar
  • 49
1 vote
1 answer
171 views

How do you publish on a ROS topic when the message type is not known?

I am trying to publish a ROS message in Python but I do not know the message type. I tried using AnyMsg and it did not work. If this is possible would someone be able to provide a Python code snippet?
jasonsf's user avatar
  • 49
2 votes
2 answers
113 views

Is there a way to publish a ROS AnyMsg in Python?

I am trying to publish a rospy.msg.AnyMsg by doing the following: ...
jasonsf's user avatar
  • 49
0 votes
1 answer
295 views

Running ros (built from source) with specific Python version

I am on a Jetson nano, and I need to run ROS humble under a version of Python more recent than the 3.8 version in Ubuntu 20.04's APT repo. As such, I installed python 3.11.6 through pyenv, and built ...
Matthew Gomes's user avatar
2 votes
2 answers
84 views

How to disable dynamic reconfigure parameters?

Is there any way to gray out/ disable a dynamic reconfigure parameter? I would like to freeze certain parameters based on the value of other parameters. Here is a related question but without an ...
Scotrraaj Gopal's user avatar
1 vote
0 answers
24 views

Painting the spots robot visited: in Gazebo

I have a robot (let's say it is a simple 2-wheeled+caster wheel diff drive robot). It works as a vacuum cleaner of a sort: moves over the "world", leaving behind a band of "clean carpet&...
Steve Brown's user avatar
0 votes
0 answers
28 views

ImportError: cannot import name 'Respawn' from 'respawnGoal'

I am trying to run Machine Learning demos for ros noetic on Ubuntu 20.04 and I am getting this error. When I run this command: ...
Mike's user avatar
  • 1
0 votes
0 answers
22 views

Issues with asynchronously handling a Subscriber callback

I am trying to create a listener that sends a message through a Discord webhook to my Discord server. The issue that I am encountering at the moment is that I do not know how to create an asynchronous ...
Pogo's user avatar
  • 1
0 votes
1 answer
121 views

can not mirror the nav2_bringup package

I want to make some modifications to the nav2_bringup package. Therefore, I just copied the nav2_bringup package put it in the workspace and ran the Turtlebot 3 simulator. The following error occurred....
GPrathap's user avatar
  • 137
0 votes
0 answers
35 views

Fix Object in Gazebo Environment Simulation after Spawning

I am using Gazebo-11 with rospy (python) in ROS Noetic. After spawning an object (urdf) on a table with rospy, I want to fix it in the world frame, so it does not move any more. PS: I know how to ...
Wadhah's user avatar
  • 1
0 votes
0 answers
47 views

Fix Object in Gazebo Simulation after Spawning

I am using Gazebo-11 with rospy (python) in ROS Noetic. After spawning an object (urdf) on a table with rospy, I want to fix it in the world frame, so it does not move any more. PS: I know how to ...
Wadhah's user avatar
  • 1
0 votes
1 answer
2k views

ROS2 Foxy : DeprecationWarning: pkg_resources is deprecated as an API

I am trying to fly a tello drone in a gazebo simulation ROS Driver for the tello Drone. When I try running the following script, (after ofcourse building the package) - ...
Prabhav Gupta's user avatar
1 vote
1 answer
603 views

catkin build fails because PythonInterp cannot be found

I am on Ubuntu 20.04 using ros noetic. When trying to run catkin build <package_name> I get the following error message: ...
user123's user avatar
  • 11
0 votes
1 answer
426 views

AttributeError: module 'posixpath' has no attribute 'joint'

I am trying to develop a simple bot using ROS 2. I created a package called my_rover. when I give colcon build --packages-select my_rover it gives this error which ...
Vasanth's user avatar
  • 17
0 votes
1 answer
43 views

Undefined symbol after source ros

Hello, I create my own library with setuptools. When I run the command in terminal : python3.8 Then I import my library, it works properly. But if before starting ...
user avatar
1 vote
1 answer
569 views

ROS with python virtual environment

I installed ROS noetic on my ubuntu machine using apt command. It uses root python installation (python3.8) like /usr/bin/python3. All ROS related python modules ...
user avatar
0 votes
1 answer
39 views

How to change speed/velocity when moving a robot using JointState?

I am able to move a 2 arm ABB YuMi robot arm (7 joints and a gripper per arm) using the following function as intended (http://docs.ros.org/en/noetic/api/sensor_msgs/html/msg/JointState.html) ...
user avatar
0 votes
1 answer
29 views

Any Ideas what could be causing this error from a launch file? - TCPROS

I am converting the ros-trimble-bd960 package to read from a socket rather than serial port. I thought this was pretty straight forward as they read the same type of data but I just needed to change a ...
Chase's user avatar
  • 22
0 votes
1 answer
221 views

How to create a 2D array in ROS

I want to do a custom msg as 2D array which has 4 variables. x, y, velocity, and angle. Each variable will be set to a value as 2D array. Below is the code: ...
user avatar
0 votes
1 answer
249 views

MD5sum Error: Client Topic Datatype Mismatch

I am running the sciurus17 sample code file. After running this launch file, when I try to echo the contents of any /move_group/.... topic, I receive the following error: ...
user avatar
0 votes
1 answer
1 view

Why do we use equal sign?

In these two lines, the author has used the equal sign inside the parenthesis. ...
user avatar
0 votes
1 answer
23 views

Error smach_viewer in ROS noetic

Hi, I read the smach tutorial and there is no problem until I run smach_viewer command. Smach tutorial rosrun smach_viewer smach_viewer.py The terminal shows the ...
user avatar
0 votes
1 answer
36 views

OpenCV and ROS melodic using python3

Hi, I would like to subscribe to the camera topic of my robot and use this images in openCV. Unfortunatly, I need to use Python3 in melodic because of the robot, so using cv_bridge seems not to work. ...
user avatar
0 votes
1 answer
7 views

ROS Services in Python

Hi I create not ROS python code for the server and the client. But need some help in implementing the ROS part for both of them. The Server only need to print a message as a list starting with 3 ...
user avatar
1 vote
1 answer
14 views

What controls the Python search path, and how?

In my shell I first activate a Python virtual environment and then the Catkin workspace which results in this sys.path, which searches for Python modules in this ...
user avatar
0 votes
1 answer
17 views

how to use python3.8 with ROS Kinetic in a node (import rospy)?

Hey, I am using ROS kinetic which supports python2.7. I want to run a node with python3.8 using rosrun. when I used a shebang to test the script without any "import rospy" it worked. but ...
user avatar
0 votes
1 answer
16 views

Reverting data type from string/JSON

Hi, I had to convert msg like geometry_msg data type to string so that I can upload it to the MYSQL database. I was wondering if there is a way that can revert String back to the original data type. ...
user avatar
1 vote
1 answer
584 views

How to set/get ROS2 params from another node using Python?

Hi guys, how can I get/set the parameter value of another node? Something like ros2 param get /my_node my_param But in code? Thank you all! Originally posted by ...
user avatar
0 votes
1 answer
19 views

rosdep cannot initialise

System spec: Ubuntu 18.04 ROS Melodic Python 3.10.2 (when i run python --version) Jetson Xavier Description: I was following the official tutorial from ROS wiki on installing ROS Melodic but I having ...
user avatar
0 votes
1 answer
3 views

how can I load neural network with ros-melodic?

Hi I'm trying to combine UR5 robot with neural network. I trained SAC with python3 and I hoped to load action obtained from SAC to apply it on ROS using python 2. Is there any way to enable it? Before ...
user avatar
0 votes
1 answer
33 views

create a map for navigation from points?

Hi everyone, I would like to create a map (pgm image and related yaml file) for robot navigation. I need to create the map inside a python code where I have all the points of interest available such ...
user avatar
0 votes
1 answer
26 views

Dependency on python module `sys`

I am working on a ROS noetic package which includes a node which imports the python sys module (in Ubuntu 20.04 with python3). Is it necessary to declare the ...
user avatar
0 votes
1 answer
41 views

Installing ROS2 python version

Hello, I'm trying to install ROS2 Crystal on the machine which already has ROS Melodic. I follow the standard guide https://docs.ros.org/en/crystal/Installation/Linux-Install-Binary.html At the step '...
user avatar
0 votes
1 answer
71 views

Running ros2 node inside blender venv

Hi all, I'm trying to run simple ros2 node inside blender environment. The node should render some scenario and publish the frames to a topic using cv_bridge. I tried to source /opt/ros/foxy/setup....
Iftahnaf's user avatar
0 votes
1 answer
97 views

Rosbag + python: reading single message

Good day. Is there any way to read a single message from a rosbag without iterating as is today possible with a txt file (in ROS1, no ROS2)? The point is to "remember" what in the rosbag ...
user avatar
0 votes
1 answer
20 views

mavros rotation over z axis

Dear community. Since I did not get an answer to my last post due to the lack of info I have posted. The goal I want to achieve is to rotate the drone over the z-axis slow. The node ...
user avatar
0 votes
1 answer
410 views

/usr/bin/env: ‘python\r’: No such file or directory

When using WSL to write python code and then trying to run it from rosrun, this error code is encountered. Originally posted by Victor_Kash on ROS Answers with karma: 50 on 2021-08-30 Post score: 0
user avatar
0 votes
1 answer
36 views

What's the right command line for ROS2 FOXY using sensors_msg?

I ran ros2 show interface sensor_msgs/msg/JointState to see how to publish using the command line AND python code. THis is the result: ...
Garrett Fogerlie's user avatar
0 votes
1 answer
90 views

ROS2 Publish and subscribe in same node

I am trying below code where I have a ROS2 foxy node that first publishes camera frames to a topic camera_frame and then is supposed to be listening to another topic drive_topic. I have created a ...
user avatar
0 votes
1 answer
31 views

ros2-foxy-angles from_degrees Python example?

ROS nub I found https://index.ros.org/p/angles/ and ros2-foxy-angles got installed by rosdep from my package.xml: <exec_depend>angles</exec_depend> ...
user avatar
0 votes
1 answer
37 views

colcon build fails when adding pkg in setup.py

Greetings: I am new to ROS2 and paid for a tutorial that has 10 sections. I understand everything so far. The course has covered building packages, nodes, topics, and servers. It shows me how to do ...
user avatar
0 votes
1 answer
37 views

Is there a way to avoid having to "colcon build" every time I edit Python code?

I am using Dashing of ROS2. I am using Python Code. Every time I edit the python code in the node file, I do a "colcon build". Is there a way to avoid having to "colcon build" ...
user avatar