-
Notifications
You must be signed in to change notification settings - Fork 3
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
Owrs 346 wheel visualise pull #2
base: master
Are you sure you want to change the base?
Conversation
… into OWRS-339-joystick-code
Set up the topic and receive topic, try to get around with QPaint, Paint a rectangle and triangle but need to figure out combine shape
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very close main problems are with formating and compatibility
src/ros_video_components/include/ros_video_components/ros_wheel_visualize.hpp
Outdated
Show resolved
Hide resolved
@@ -63,6 +63,7 @@ void ROS_Video_Component::paint(QPainter * painter) { | |||
if(current_image) { | |||
painter->drawImage(QPoint(0,0), *(this->current_image)); | |||
} | |||
painter->drawRect(0,0,1,10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this for?
|
||
void ROS_Wheel_Visualize::setup(ros::NodeHandle * nh) { | ||
|
||
wheel_sub = nh->subscribe<owr_messages::board>("/rover/wheel", 1, &ROS_Wheel_Visualize::receive_message,this); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you make this set by a qml property the same way the video one is please?
int y = RECT_Y; | ||
int width = RECT_WIDTH; | ||
int height = RECT_HEIGHT; | ||
int centerx = 60; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
//} | ||
//QPolygon polygon; // Using Polygon class, to draw the triangle | ||
//polygon << QPoint(0,-40) << QPoint(25,40) << QPoint(-25,40); | ||
//painter->drawPolygon(polygon); // Draw a triangle on a polygonal model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented out code
|
||
void ROS_Wheel_Visualize::set_topic(const QString & new_value) { | ||
ROS_INFO("set_topic"); | ||
if(topic_value != new_value) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
id: window1 | ||
visible: true | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this used for?
|
||
void ROS_Wheel_Visualize::receive_message(const owr_messages::board::ConstPtr & msg){ | ||
curr = msg->joints[0].currentPos; | ||
targ = msg->joints[0].targetPos; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation
id: window1 | ||
visible: true | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this used for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is redundant.
Also need to resolve the merge conflict with master |
No description provided.