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

Added new script for posting messages to CAN #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Rive1311
Copy link

No description provided.

Copy link
Member

@aronasefaw aronasefaw left a 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!

# 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)
Copy link
Member

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

# vel_tot = math.sqrt(vel_x**2 + vel_y**2)
# sbg_msg_odo.VELOCITY = vel_tot

rospy.loginfo("Published SBG messages")
Copy link
Member

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

Copy link
Member

@aronasefaw aronasefaw left a 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"/>
Copy link
Member

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)"/>

Copy link
Member

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

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

Successfully merging this pull request may close these issues.

3 participants