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

error in rviz_viewer.py #3

Open
JCampbell9 opened this issue Nov 18, 2021 · 3 comments
Open

error in rviz_viewer.py #3

JCampbell9 opened this issue Nov 18, 2021 · 3 comments

Comments

@JCampbell9
Copy link

JCampbell9 commented Nov 18, 2021

Hey, when running roslaunch relaxed_ik_ros1 rviz_viewer.launch I get the TypeError as seen below, killing the rviz window.
(BTW I'm using python 2.7.17)
Edit: Also I'm using ros melodic on ubuntu 18.04 (via wslg)

image

@SimonQi1
Copy link

Hey, when running roslaunch relaxed_ik_ros1 rviz_viewer.launch I get the TypeError as seen below, killing the rviz window. (BTW I'm using python 2.7.17)

image

I have the same problem with you, I think that the vision of python is the root of the problem, but if I change the vision to python3, then the pykdl will error.

@JCampbell9
Copy link
Author

So this problem seems to be caused by the line ~311 exec(joint_state_define) which changes joint_state_define from type str to type function. This then throws the error of trying to combine a function and str in line 379 exec(joint_state_define + "\njs = joint_state_define(x)", globals(), loc) because joint_state_define is now of type function.

My quick fix is to make a duplicate variable of joint_state_define (I used joint_state_define2) before line 311 and used the duplicate variable ( joint_state_define2) for line 379.

@pragathip
Copy link

I think line 311 can be commented out. It does not seem to serve any purpose.

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

3 participants