Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ROS Noetic] AttributeError: module 'rviz' has no attribute 'VisualizationFrame' (fixed) #19

Closed
SmnGdn opened this issue Mar 2, 2023 · 1 comment

Comments

@SmnGdn
Copy link

SmnGdn commented Mar 2, 2023

~/catkin_ws$ roslaunch champ_setup_assistant setup_assistant.launch
 
... logging to /home/user/.ros/log/e8c9ff6a-b90d-11ed-9fec-b5b3893dba3e/roslaunch-myPC.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://myPC:32999/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.15

NODES
  /
    champ_setup_assistant (champ_setup_assistant/setup_assistant.py)

auto-starting new master
process[master]: started with pid [582802]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to e8c9ff6a-b90d-11ed-9fec-b5b3893dba3e
process[rosout-1]: started with pid [582823]
started core service [/rosout]
process[champ_setup_assistant-2]: started with pid [582826]
Traceback (most recent call last):
  File "/home/user/catkin_ws/src/champ_setup_assistant/scripts/setup_assistant.py", line 79, in <module>
    sa = SetupAssistant()
  File "/home/user/catkin_ws/src/champ_setup_assistant/scripts/setup_assistant.py", line 54, in __init__
    self.robot_viz = RvizWidget(self)
  File "/home/user/catkin_ws/src/champ_setup_assistant/scripts/rviz_widget.py", line 57, in __init__
    self.frame = rviz.VisualizationFrame()
AttributeError: module 'rviz' has no attribute 'VisualizationFrame'

The fix is to replace
import rviz
with
from rviz import bindings as rviz

in the file
champ_setup_assistant/scripts/setup_assistant.py

@SmnGdn SmnGdn closed this as completed Mar 2, 2023
@fan-ziqi
Copy link

~/catkin_ws$ roslaunch champ_setup_assistant setup_assistant.launch
 
... logging to /home/user/.ros/log/e8c9ff6a-b90d-11ed-9fec-b5b3893dba3e/roslaunch-myPC.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://myPC:32999/

SUMMARY
========

PARAMETERS
 * /rosdistro: noetic
 * /rosversion: 1.15.15

NODES
  /
    champ_setup_assistant (champ_setup_assistant/setup_assistant.py)

auto-starting new master
process[master]: started with pid [582802]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to e8c9ff6a-b90d-11ed-9fec-b5b3893dba3e
process[rosout-1]: started with pid [582823]
started core service [/rosout]
process[champ_setup_assistant-2]: started with pid [582826]
Traceback (most recent call last):
  File "/home/user/catkin_ws/src/champ_setup_assistant/scripts/setup_assistant.py", line 79, in <module>
    sa = SetupAssistant()
  File "/home/user/catkin_ws/src/champ_setup_assistant/scripts/setup_assistant.py", line 54, in __init__
    self.robot_viz = RvizWidget(self)
  File "/home/user/catkin_ws/src/champ_setup_assistant/scripts/rviz_widget.py", line 57, in __init__
    self.frame = rviz.VisualizationFrame()
AttributeError: module 'rviz' has no attribute 'VisualizationFrame'

The fix is to replace import rviz with from rviz import bindings as rviz

in the file champ_setup_assistant/scripts/setup_assistant.py

It should be champ_setup_assistant/scripts/rviz_widget.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants