Open curious-energy opened 3 years ago
I encounter the same build error using the same setup (18.04,melodic)
Hi @bedaberner @curious-energy, this problem happened because the code tries to publish non-message object, particularly in the file flightgoggles/flightgoggles_uav_dynamics/src/flightgoggles_uav_dynamics_node.cpp
and flighgoggles/flightgoggles_car_dynamics/src/flightgoggles_car_dynamics_node.cpp
. you can solve this problem by changing every line of clockPub_.publish(currentTime_);
in those files to this:
std_msgs::Time time_msg;
time_msg.data = currentTime_;
clockPub_.publish(time_msg);
However, I still don't know whether it is the correct message object, but in my local machine, it works in the roslaunch flightgoggles teleopExample.launch
run
note: in the publisher definition, clockPub_
uses the rosgraph_msgs/Clock
message object, but when I changed the message object, I got another error in the flightgoggles_marker_visualizer_node
.
@curious-energy @bedaberner Any updates on the solution to your problem. Does @maulanaazhari solution work?
@mhathiyari worth to try, let us know the result!
@maulanaazhari It didn't. wondering how the others above solved it.
Just an update used docker with ros kinetic, and you dont get the above error. Thus you can run the flight googles code in the docker and unity env on your local machine. You can use docker --net host -it NAME command to make sure your host and container share the same network thus allowing the simulation code and unity engine to communicate.
For me changing to the following works,
rosgraphmsgs::Clock clock; clock.clock = currentTime; clockPub_.publish(clock);
Cheers.
When I build this project, some error occur
system: ubuntu 18.04 ros melodic
reference: ROS Client