-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added new script for posting messages to CAN #1
base: master
Are you sure you want to change the base?
Conversation
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.
See my comments, its not a lot to fix. Also will this be included in the DLIO launch file or will we need to run it as a separate ros python file (i.e. rosrun direct_lidar_inertial_odometry dlio_to_can.py) ? The first option would be much much better!
scripts/dlio_to_can.py
Outdated
# Assign linear velocity to message field | ||
sbg_msg_odo.VELOCITY = odom_msg.twist.twist.linear.x | ||
|
||
# If the velocity should be like sqrt(x^2+y^2) |
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.
Yes it should be sqrt(x^2+y^2), check the slack group chat
scripts/dlio_to_can.py
Outdated
# vel_tot = math.sqrt(vel_x**2 + vel_y**2) | ||
# sbg_msg_odo.VELOCITY = vel_tot | ||
|
||
rospy.loginfo("Published SBG messages") |
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.
Wont this print every time we publish, that could be a bit much
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.
Check comments
@@ -59,6 +59,7 @@ | |||
|
|||
<!-- RViz --> | |||
<node pkg="rviz" type="rviz" name="dlio_rviz" args="-d $(find direct_lidar_inertial_odometry)/launch/dlio.rviz" if="$(arg rviz)"/> | |||
|
|||
|
|||
<node pkg="direct_lidar_inertial_odometry" type="dlio_to_can" name="dlio_2_can" output="screen"/> |
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 would like a flag, just like in the line above, so an argument is checked to decide if the script is ran.
if="$(arg rviz)"/>
but maybe something like:
if="$(arg can)"/>
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.
check chatgpt how to do this, i.e. if you also have to add something similar toargs="-d $(find direct_lidar_inertial_odometry)/launch/dlio.rviz"
or not. You could also check other packages in the repo
No description provided.