ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

tf2 for ROS melodic

asked 2022-03-19 01:24:43 -0600

distro gravatar image

I would like to install tf2 for python3 environment in ROS-melodic but the github seems to only have it for neotic. Is there a tf2 out there for ROS-melodic?

edit retag flag offensive close merge delete

Comments

See this github comment: sudo apt install ros-melodic-tf2-ros

abhishek47 gravatar image abhishek47  ( 2022-03-20 04:44:12 -0600 )edit

@abhishek47 from my pe=reviouso comment I looked deeper into my files because the error says there's a problem with python2.7 in my ros, apprenetly I dont have python3 for ros, which I thought I did. WOuld you happen to know how to switch from python 2.7 to 3?

distro gravatar image distro  ( 2022-03-20 22:57:44 -0600 )edit
abhishek47 gravatar image abhishek47  ( 2022-03-21 01:44:10 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-03-20 22:55:53 -0600

distro gravatar image

@abhishek47 I get this:

Traceback (most recent call last):
  File "/home/philip/server_prac/src/action_practice/src/map_zone_update.py", line 19, in <module>
    import tf2_ros
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module>
    from tf2_py import *
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 38, in <module>
    from ._tf2 import *
ImportError: dynamic module does not define module export function (PyInit__tf2)
[mapzoner-1] process has died [pid 25790, exit code 1, cmd /home/philip/server_prac/src/action_practice/src/map_zone_update.py __name:=mapzoner __log:=/home/philip/.ros/log/879a2c7c-a8c6-11ec-9206-d43b04207196/mapzoner-1.log].
log file: /home/philip/.ros/log/879a2c7c-a8c6-11ec-9206-d43b04207196/mapzoner-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

when I try to import tf2_ros

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-03-19 01:24:43 -0600

Seen: 885 times

Last updated: Mar 20 '22